GS and NGINX - Printable Version +- GetSimple Support Forum (http://get-simple.info/forums) +-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3) +--- Forum: Installation & Setup (http://get-simple.info/forums/forumdisplay.php?fid=5) +--- Thread: GS and NGINX (/showthread.php?tid=1269) Pages:
1
2
|
RE: GS and NGINX - Everyone - 2013-09-20 It won't work without altering GS files. However you can use a workaround.
RE: GS and NGINX - shawn_a - 2013-09-20 Maybe one of these days we can get an nice nginx config put on github. RE: GS and NGINX - Everyone - 2013-09-20 This is a bit complicated. Common practice in inginx is to have a full server configuration along with locations in one single file, contrary to Apache, where it's common to regulate location access per folder with .htaccess files. A full blown nginx server config template won't be suitable for each and every installation as different projects may require different configuration. One way around this is to have a locations-only file with the adnotation that it needs to be included in a proper gs server config. Another way is to have a very basic config template with the adnotation that this config is in fact very basic and needs to be adjusted to work properly. I need to do a bit more testing and then I'll be able to provide both if needed. RE: GS and NGINX - marrco - 2014-05-10 not yet in the semi-official config, but a few more suggestions for advance setting. All tested and used in production for years: if using a modern debian server (can't tell about other distros) and knowing what you're doing we can set fastcgi_cache_path /run/shm/ and not /var/cache/ (df should confirm that /run/shm is mounted using tmpfs that defaults to ram). additional security to admin and login area is quite easy: # protect login.php and php files in admin/ location ~ (login\.php|admin/.*\.php) { auth_basic "additional security layer here!"; auth_basic_user_file one-more-pass; [........] } plus we can use stricter rate limiting only for that stanza. I usually have something site-wide like: #create two zones in order to mitigate small attacks limit_conn_zone $binary_remote_addr zone=perip:10m; limit_conn_zone $server_name zone=perserver:10m; server { limit_conn perip 3; limit_conn perserver 12; ## Block some robots ## if ($http_user_agent ~* MJ12bot|scrapbot|bingbot) { return 403; } and since someone asked about preventing hotlinking that's quite easy location ~ /dont-hotlink/ { valid_referers www.mysite.com; (keep in mind that while limiting hotlinlinking you can sometimes want to grant access to google, in order to get more visits, and images must appear in google images search) lst but not least, everyone interested in nginx advanced config should read http://nginx.com/resources/admin-guide/ and please, PLEASE report in this thread findings, suggestions and ideas to create a even better config. my idea is to have something good enough to post it to github too. But i'd like someone else help me verify everything in those 2 (basic and advanced) config RE: GS and NGINX - shawn_a - 2014-05-10 yes, an advanced or secured additional config would be useful probably for apache also, there is some stuff in wiki for that, enable compression, cache tweaks etc. RE: GS and NGINX - cviebrock - 2014-06-05 I'm trying to set up GS on an nginx server, where GS is not in the root directory of the site but only handles a subdirectory (example.com/publications). Rewrites aren't working as expected. My nginx config: Code: index index.php index.html; The "php_params" file is a shortcut I use that handles all the fastcgi stuff. (I host several other sites, including some Wordpress ones where we've converted the .htaccess to nginx configs, and they all work just fine, so I'm quite sure the "php_params" isn't the issue.) With the above config, what happens is this:
I have Use Fancy URLs enabled in the General Settings, and the Permalink Structure is "%parent%/%slug%/" (although the input field is disabled and I can't edit it). Any idea where I messed up? RE: GS and NGINX - scote - 2014-12-01 Thanks @marrco for posting the nginx config for GS, I used the one from post #9 in this thread, running on a raspberry pi, I wanted a lightweight server for a low traffic site which I am hosting on my ADSL line. Its all working great and running fast. I am a noob at all this php/web stuff but a long term *nix person and had no troubles getting it all working. RE: GS and NGINX - plahpoy - 2018-08-25 (2012-02-07, 05:22:30)[/root.] Wrote: I'm using this code Hi, I am having the exact same issue, did you ever find a solution? currently I am using: try_files $uri $uri/ /index.php?id=$uri&$args; only top level pages are working... Thanks! |