Skip to content

Instantly share code, notes, and snippets.

@tunght13488
Created July 17, 2015 04:05
Show Gist options
  • Save tunght13488/786e9853d7d036adf4cb to your computer and use it in GitHub Desktop.
Save tunght13488/786e9853d7d036adf4cb to your computer and use it in GitHub Desktop.
nginx
server {
include port/http.conf;
# listen 8080;
server_name laravel.dev;
root /path/to/laravel/public;
index index.php index.html;
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
include phpfastcgi.conf;
# location ~ \.php$ {
# try_files $uri /index.php =404;
# fastcgi_pass unix:/usr/local/var/run/php5-fpm.sock;
# fastcgi_split_path_info ^(.+\.php)(/.*)$;
# fastcgi_index index.php;
# fastcgi_param HTTPS $fastcgi_https;
# fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
# include fastcgi_params;
# }
error_log /usr/local/var/log/nginx/laravel.dev_error.log;
access_log /usr/local/var/log/nginx/laravel.dev_access.log;
}
server {
include port/https.conf;
# listen 8443 ssl;
server_name laravel.dev;
include ssl-shared-cert.inc;
# ssl on;
# ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
# ssl_ciphers ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW;
# ssl_certificate ssl/selfsigned.crt;
# ssl_certificate_key ssl/private.key;
root /path/to/laravel/public;
index index.php index.html;
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
include phpfastcgi.conf;
# location ~ \.php$ {
# try_files $uri /index.php =404;
# fastcgi_pass unix:/usr/local/var/run/php5-fpm.sock;
# fastcgi_split_path_info ^(.+\.php)(/.*)$;
# fastcgi_index index.php;
# fastcgi_param HTTPS $fastcgi_https;
# fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
# include fastcgi_params;
# }
error_log /usr/local/var/log/nginx/laravel.dev_error.log;
access_log /usr/local/var/log/nginx/laravel.dev_access.log;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment