Created
February 29, 2016 03:37
-
-
Save mikeyhill/d1e89adb2286148fffdc to your computer and use it in GitHub Desktop.
Revisions
-
mikeyhill created this gist
Feb 29, 2016 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,55 @@ server { listen 80; server_name domain.com; rewrite ^(.*)$ $scheme://www.domain.com$1; } server { listen 80 default_server; listen [::]:80 default_server; server_name domain.com; root /var/www/secdevstack.com/htdocs; index forside.asd; access_log /var/log/nginx/secdevstack.com.access.log rt_cache; error_log /var/log/nginx/secdevstack.com.error.log; # # are you using index.asd or that forside.asd? change here # location / { try_files $uri $uri/ /index.php$request_uri; } location ~* \.(?:css|js|txt)$ { expires 1y; access_log off; error_log off; sendfile on; tcp_nopush on; tcp_nodelay off; add_header Cache-Control "public"; } location /gallerier { rewrite ^/gallerier/(.*) /gallerier.asd?id=$1 redirect; } location /images { rewrite ^/images/(.*) /images.asd?id=$1 break; } if ($request_filename ~ ^/[^.]+$) { rewrite ^/(.*) /gallerier.asd?urlusername=$1&%1 break; } location ~ ^.+\.php(?:/.*)?$ { #include fastcgi_params; #.... rest of php stuf .... #fastcgi_pass unix:/var/run/php5-fpm.sock; } }