socialengine - Struggling with nginx.conf rewrites -


trying nginx on jelastic play nice nice socialengine. there's myriad of forum posts , other documentation i've hit brick wall.

unmodified nginx.conf

#user  nobody; worker_processes  1;  error_log  /var/log/nginx/error.log; #error_log  logs/error.log  notice; #error_log  logs/error.log  info;  #pid        logs/nginx.pid;   events {     worker_connections  1024; }   http {     server_tokens off;     include       mime.types;     default_type  application/octet-stream;      log_format  main  '$http_x_forwarded_for - $remote_user [$time_local] "$request" '                       '$status $body_bytes_sent "$http_referer" '                       '"$http_user_agent" "$http_x_forwarded_for"';      access_log  /var/log/nginx/access.log  main;      sendfile        on;     #tcp_nopush     on;      #keepalive_timeout  0;     keepalive_timeout  65;      #gzip  on;      # websocket support     #upstream websocket {     #    server 127.0.0.1:<port>;     #}      server {         listen       80;         server_name  localhost;          #charset koi8-r;          #access_log  logs/host.access.log  main;         include /etc/nginx/aliases.conf;          #location /ws {         #    proxy_pass http://websocket;         #    proxy_http_version 1.1;         #    proxy_set_header upgrade $http_upgrade;         #    proxy_set_header connection "upgrade";         #}           location / {             root   /var/www/webroot/root;             index  index.html index.htm index.php;              location ~ \.php$ {                 location ~ /\. { deny all; access_log off; log_not_found off; }             include /etc/nginx/fastcgi_params;             fastcgi_pass 127.0.0.1:9000;             fastcgi_param script_filename /var/www/webroot/root$fastcgi_script_name;             fastcgi_param path_info $fastcgi_script_name;             fastcgi_param document_root /var/www/webroot/root;             }          }         index  index.php index.html index.htm;          #error_page  404              /404.html;          # redirect server error pages static page /50x.html         #         error_page   500 502 503 504  /50x.html;         location = /50x.html {             root   html;         }          # proxy php scripts apache listening on 127.0.0.1:80         #         #location ~ \.php$ {         #    proxy_pass   http://127.0.0.1;         #}     location ~ /\. { deny all; access_log off; log_not_found off; }         # pass php scripts fastcgi server listening on 127.0.0.1:9000         #         #location ~ \.php$ {         #    root           html;         #    fastcgi_pass   127.0.0.1:9000;         #    fastcgi_index  index.php;         #    fastcgi_param  script_filename  /scripts$fastcgi_script_name;         #    include        fastcgi_params;         #}          # deny access .htaccess files, if apache's document root         # concurs nginx's 1         #         #location ~ /\.ht {         #    deny  all;         #}     location ~ \.php$ {         location ~ /\. { deny all; access_log off; log_not_found off; }             include /etc/nginx/fastcgi_params;             fastcgi_pass 127.0.0.1:9000;             fastcgi_param script_filename /var/www/webroot$fastcgi_script_name;             fastcgi_param path_info $fastcgi_script_name;             fastcgi_param document_root /var/www/webroot;         }      }  include /etc/nginx/conf.d/*.conf;  } 

this apparently trying accomplish in order rewrites socialengine work.

location / {  index  index.php index.html index.htm; if ( $request_uri ~ "/" ) { rewrite ^(.*)$ /index.php?rewrite=1 last; } if (!-e $request_filename) { rewrite ^(.*)$ /index.php?rewrite=1 last;}  }   location /install/ { index index.php; if (!-e $request_filename) { rewrite ^(.*)$ /install/index.php?rewrite=1 last; } } 

this seems super simple me @ outset, reason way have attempted add these lines(or parts thereof) has prevented nginx server restarting.


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -