-
-
Save alanljj/27fa0fc15183e9c324cee5551ad99f80 to your computer and use it in GitHub Desktop.
lychee nginx config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
server_name my.lychee.site; | |
listen 80; | |
root /var/www/my.lychee.site/htdocs; | |
access_log /var/www/my.lychee.site/logs/access.log; | |
error_log /var/www/my.lychee.site/logs/error.log; | |
index index.php index.html; | |
location / { | |
try_files $uri $uri/ /index.html; | |
} | |
location ~* \.(?:ico|css|js|gif|jpe?g|png|ttf|woff)\$ { | |
access_log off; | |
expires 30d; | |
add_header Pragma public; | |
add_header Cache-Control "public, mustrevalidate, proxy-revalidate"; | |
} | |
location ~ \.php$ { | |
fastcgi_split_path_info ^(.*\.php)(/.*)?$; | |
fastcgi_pass unix:/var/run/php5-fpm.sock; | |
fastcgi_index index.php; | |
include fastcgi_params; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
fastcgi_intercept_errors off; | |
fastcgi_buffer_size 16k; | |
fastcgi_buffers 4 16k; | |
} | |
location ~ /\.ht { | |
deny all; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment