====== NGINX ====== ===== Install ===== apt install nginx ===== Status ===== systemctl status nginx ===== Restart ===== systemctl restart nginx systemctl reload nginx ===== UTIL ===== ss -ltup Após qualquer modificação no arquivo, restart o serviço nginx. ===== Config ===== == Debian Path == /etc/nginx/ ==== FILE "nginx.conf" ==== worker_processes 1; #ou auto worker_connections 1024; #quantidades de conexões http{ #configurações de http server{#local de configurações das conexões listen 8080;#porta de conexão server_name localhost;#colocar o nome do domínio location /{ #configuração quando recebe requisição para apenas '/' root html; index index.html index.htm; } } } ==== FILE "default" ==== == Debian path == /etc/nginx/sites-enabled/ server{ listen 80 default_server; listen [::}::80 default_server; server_name domain.name.com; location /{ #endereço de redirecionamento proxy_pass http://127.0.0.1:10000;#indique aqui a porta que quer utilizar proxy_set_header Host $host;#Não é necessário } } ===== PROXY REVERSE ===== ===== ERROS NGINX ===== ==== Nginx: Failed to start A high performance web server and a reverse proxy server ==== HTTP 80 port já esta sendo usada: sudo service apache2 stop sudo systemctl restart nginx ==== Referências e Agradecimentos ==== [[https://www.youtube.com/watch?v=DyXl4c2XN-o&t=310s&ab_channel=ChristianLempa| YOUTUBE - Christian Lempa]]