Skip to content

Instantly share code, notes, and snippets.

@arx76
Forked from deyvsonaguiar/ISPConfig + Laravel
Created November 29, 2018 14:39
Show Gist options
  • Save arx76/edfa68f4ec3b4072be2cb38758d76b83 to your computer and use it in GitHub Desktop.
Save arx76/edfa68f4ec3b4072be2cb38758d76b83 to your computer and use it in GitHub Desktop.
Diretiva Nginx para usar Laravel e ISPConfig3
location = /robots.txt {
root {DOCROOT}public;
access_log off;
log_not_found off;
allow all;
}
location / {
root {DOCROOT}public;
try_files $uri $uri/ /index.php?q=$uri&$args;
#Para desativar o site comentar a linha acima e habilitar esta baixo
#return 503 "Servico Indisponivel";
}
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options "nosniff";
error_page 404 /index.php;
location @php {
try_files $uri =404;
root {DOCROOT}public;
include /etc/nginx/fastcgi_params;
fastcgi_pass unix:/var/lib/php7.1-fpm/web14.sock; ## Alterar usuario web14 conforme sua aplicação e a versão do PHP caso necessário
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_intercept_errors off;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment