Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 80;
- server_name www.mywebsite.com;
- rewrite ^/(.*) http://mywebsite.com/$1 permanent;
- }
- server {
- listen 80;
- server_name mywebsite.com;
- if (!-e $request_filename)
- {
- rewrite ^/(.*)$ /index.php?/$1 break;
- break;
- }
- rewrite ^themes/.*/(layouts|pages|partials)/.*.htm /index.php break;
- rewrite ^storage/app/uploads/protected/.* /index.php break;
- rewrite ^app/.* /index.php break;
- location / {
- try_files $uri $uri/ /index.php?$query_string;
- }
- root /var/www/mywebsite;
- index index.php index.html index.htm;
- location ~ \.php$ {
- try_files $uri /index.php =404;
- fastcgi_split_path_info ^(.+\.php)(/.+)$;
- fastcgi_pass unix:/var/run/php5-fpm.sock;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- include fastcgi_params;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement