Skip to content

Instantly share code, notes, and snippets.

@ottonet
Created July 14, 2015 15:55
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ottonet/3e488ff995193f02fa2d to your computer and use it in GitHub Desktop.
Save ottonet/3e488ff995193f02fa2d to your computer and use it in GitHub Desktop.
lychee nginx config
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;
}
}
@nonstopflights
Copy link

Could not get it to work till I tried this. thanks!

@alanljj
Copy link

alanljj commented Mar 15, 2018

Thanks, very helpful!

@aaramirez91
Copy link

aaramirez91 commented Mar 27, 2019

HI, could you help me with some doubts, please.

Where do i add that code lines? should i must create a new file? if yes, how must be named, what will be the extension of the new file and where i must save it?

I'm trying to install/configure lychee on cPanel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment