Nginx Linux error

GetRekt

Member
Aug 1, 2014
75
5
Here is my Nginx.conf located in /etc/nginx/nginx.conf

Code:
#user  nobody;
worker_processes  1;

#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;

#pid        logs/nginx.pid;


events {
    worker_connections  1024;
}


http {
    include       mime.types;
    default_type  application/octet-stream;

    #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
    #                  '$status $body_bytes_sent "$http_referer" '
    #                  '"$http_user_agent" "$http_x_forwarded_for"';

    #access_log  logs/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;

    #gzip  on;

    server {
        listen       80;
        server_name  localhost;

        #charset koi8-r;

        #access_log  logs/host.access.log  main;

        location / {
            root   /var/www/virtual/habvine/root;
            index  index.php index.html index.htm;
            rewrite ^/(.*)\.html /$1\.php;
            if (!-e $request_filename){
              rewrite ^/out/([^/]+)(|/)$ /out.php?out=$1;
            }
        }
       
        error_page 500 /error.php?e=500;

        error_page 404 /error.php?e=404;

        error_page 403 /error.php?e=403;

        location = /crossdomain.xml {
          rewrite ^(.*)$ /crossdomain.php;
        }

        location /gamedata {
          rewrite ^/gamedata/external(|/)$ /externals.php;
        }

        location /vip {
          rewrite ^/vip/vouchers(|/)$ /redeem.php;
          rewrite ^/vip/shop(|/)$ /vipshop.php;
          rewrite ^/vip/getpoints(|/)$ /vippoints.php;
        }

        location /vote {
          rewrite ^/vote(|/)$ /api.php;
        }

        location /texts {
          rewrite ^/texts(|/)$ /externals.php?id=external_flash_texts;
        }

        location /vars {
          rewrite ^/vars(|/)$ /externals.php?id=external_variables;
        }

        location /productdata {
          rewrite ^/productdata(|/)$ /gamedata/ACTIVE/productdata.txt;
        }

        location /furnidata {
          rewrite ^/furnidata(|/)$ /gamedata/ACTIVE/furnidata.txt;
        }

        location /access_denied {
          rewrite ^/access_denied(|/)$ /access_denied.php;
        }

        location /client_denied {
          rewrite ^/client_denied(|/)$ /access_denied.php?gateway=client?novote;
        }

        location /order {
          rewrite ^/order/vip(|/)$ /ordervip.php?pass=true;
        }

        location /home {
          rewrite ^/home/([^/]+)/id(|/)$ /home.php?qryId=$1;
          rewrite ^/home/([^/]+)(|/)$ /home.php?qryName=$1;
          rewrite ^/home/(.*)/startSession/(.*)$ /startSession.php?id=$2;
          rewrite ^/home/([^/]+)/id(|/)$ /home.php?qryId=$1;
          rewrite ^/home/([^/]+)(|/)$ /home.php?qryName=$1;
        }

        location /avatarimage {
          rewrite ^/avatarimage(|/)$ /inc/imager.php?figure=$1;
        }

        location /quickmenu {
          rewrite ^/quickmenu/friends_all(|/)$ /quick-friends.php;
          rewrite ^/quickmenu/groups(|/)$ /quick-groups.php;
          rewrite ^/quickmenu/rooms(|/)$ /quick-rooms.php;
        }

        location /security_check {
          rewrite ^/security_check(|/)$ /security_check.php;
        }

        location /profile {
          rewrite ^/profile(|/)$ /profile.php;
        }

        location /values {
          rewrite ^/values(|/)$ /values.php;
        }

        location /client {
          rewrite ^/client(|/)$ /newclient.php;
        }

        location /flash_client_error {
          rewrite ^/flash_client_error(|/)$ /client_error.php;
        }

        location /client_error {
          rewrite ^/client_error(|/)$ /client_error.php;
        }

        location /me {
          rewrite ^/me(|/)$ /me.php;
        }

        location /login_popup {
          rewrite ^/login_popup(|/)$ /login-popup.php;
        }

        location /buyvip {
          rewrite ^/buyvip(|/)$ /vippage.php;
        }

        location /community {
          rewrite ^/community(|/)$ /community.php;
          rewrite ^/community/staff(|/)$ /staff.php;
        }

        location /credits {
          rewrite ^/credits(|/)$ /credits.php;
          rewrite ^/credits/pixels(|/)$ /pixels.php;
          rewrite ^/credits/club(|/)$ /habboclub.php;
          rewrite ^/credits/habboclub(|/)$ /habboclub.php;
          rewrite ^/credits/uberclub(|/)$ /habboclub.php;
          rewrite ^/credits/uberclub/tryout(|/)$ /clubtryout.php;
          rewrite ^/credits/habboclub/tryout(|/)$ /clubtryout.php;
        }

        location /register {
          rewrite ^/register(|/)$ /register.php;
          rewrite ^/register/cancel(|/)$ /register-cancel.php;
          rewrite ^/register/welcome(|/)$ /welcome.php;
          rewrite ^/register/undefined(|/)$ /index.php;
          rewrite ^/register/undefined/([^/]+)$ /me.php;
        }

        location /register_submit {
          rewrite ^/register_submit(|/)$ /register.php?doSubmit;
        }

        location /register_messages {
          rewrite ^/register_messages(|/)$ /register-messages.php;
        }

        location /account {
          rewrite ^/account/policy-verify(|/)$ /policyver.php;
          rewrite ^/account/password/forgot(|/)$ /forgot.php;
          rewrite ^/account/submit(|/)$ /index.php;
          rewrite ^/account/logout(|/)$ /logout.php;
          rewrite ^/account/logout_ok(|/)$ /logout-ok.php;
          rewrite ^/account/disconnected(|/)$ /disconnected.php;
        }

        location /articles {
          rewrite ^/articles(|/)$ /article.php?mostRecent;
          rewrite ^/articles/archive(|/)$ /article.php?mostRecent&archiveMode;
          rewrite ^/articles/([^/]+)/in/archive(|/)$ /article.php?rel=$1&archiveMode;
          rewrite ^/articles/([^/]+)(|/)$ /article.php?rel=$1;
          rewrite ^/articles/category/([^/]+)(|/)$ /article.php?category=$1;
        }

        location /myhabbo {
          rewrite ^/myhabbo/save(|/)$ /myhabbo/save.php;
          rewrite ^/myhabbo/cancel/(.*)(|/)$ /myhabbo/cancel.php?id=$1;
          rewrite ^/myhabbo/(.*)/(.*)(|/)$ /myhabbo/$1_$2.php;
          rewrite ^/myhabbo/([^.]+)(|/)$ /myhabbo.php?cmd=$1;
        }

        location /habblet {
          rewrite ^/habblet/cproxy(|/)$ /habbletProxy.php;
          rewrite ^/habblet/ajax/([^/]+)(|/)$ /habbletAjax.php?cmd=$1;
          rewrite ^/habblet/([^/]+)(|/)$ /habblet.php?cmd=$1;
        }

        location /minimail {
          rewrite ^/minimail/loadMessage(|/)$ /minimail-view.php;
          rewrite ^/minimail/([^/]+)(|/)$ /minimail.php?cmd=$1;
        }

        location /.htaccess {
          deny all;
        }

        location ~ “\.(tpl,sql)$” {
          deny all;
        }

        location /403.shtml {
          allow all;
        }

        #error_page  404              /404.html;

        # redirect server error pages to the static page /50x.html
        #
        error_page   500 502 503 504  /50x.html;
        location = /error.php {
            root   /var/www/virtual/habvine/root;
        }

        # proxy the PHP scripts to Apache listening on 127.0.0.1:80
        #
        #location ~ \.php$ {
        #    proxy_pass   http://127.0.0.1;
        #}

        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        #
        location ~ \.php$ {
            root           /var/www/virtual/habvine/root;
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME  C:/nginx/html/$fastcgi_script_name;
            include        fastcgi_params;
        }

        # deny access to .htaccess files, if Apache's document root
        # concurs with nginx's one
        #
        #location ~ /\.ht {
        #    deny  all;
        #}
    }


    # another virtual host using mix of IP-, name-, and port-based configuration
    #
    #server {
    #    listen       8000;
    #    listen       somename:8080;
    #    server_name  somename  alias  another.alias;

    #    location / {
    #        root   html;
    #        index  index.html index.htm;
    #    }
    #}


    # HTTPS server
    #
    #server {
    #    listen       443;
    #    server_name  localhost;

    #    ssl                  on;
    #    ssl_certificate      cert.pem;
    #    ssl_certificate_key  cert.key;

    #    ssl_session_timeout  5m;

    #    ssl_protocols  SSLv2 SSLv3 TLSv1;
    #    ssl_ciphers  HIGH:!aNULL:!MD5;
    #    ssl_prefer_server_ciphers   on;

    #    location / {
    #        root   html;
    #        index  index.html index.htm;
    #    }
    #}

}
 

Users who are viewing this thread

Top