-
Notifications
You must be signed in to change notification settings - Fork 12
NGINX
Chirag Gude edited this page Mar 6, 2015
·
3 revisions
Server Block for Production app
server {
listen 80;
server_name 185.38.44.97;
root /home/larabase/public;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param APP_ENV production;
include fastcgi_params;
}
}
Note
-
try_files $uri =404;
- Prevents zero-day exploits -
try_files $uri $uri/ /index.php?$query_string;
- Laravel Pretty URLs
APACHE: Set Environment Variable in Apache virtual host: SetEnv APP_ENV production