nginx with ispconfig vhost problem

Discussion in 'General' started by foxpro, Sep 8, 2013.

  1. foxpro

    foxpro New Member

    Thank you in Advance .

    I have followed This Tutorial to install ispconfig with nginx in my debian-7 VPS . Everything is ok . Smoothly running . But ....


    When i create a website and try to access that , it just show me the default page of server . That means "Wellcome to nginx" . So i checked /etc/nginx/sites-available i got two file there with that website name .
    1. zerotrace.tk.vhost
    2. zerotrace.tk.vhost.err


    I am with nginx for the first time , so please sorry if i am asking silly q and please explain elaborately .

    When i try to see there , i got this for the first one :


    [​IMG]


    Second One :


    Code:
    server {
            listen *:80;
    
    
            server_name zerotrace.tk www.zerotrace.tk;
    
            root   /var/www/zerotrace.tk/web;
    
    
    
            index index.html index.htm index.php index.cgi index.pl index.xhtml;
    
    
            location ~ \.shtml$ {
                ssi on;
            }
    
    
            error_page 400 /error/400.html;
            error_page 401 /error/401.html;
            error_page 403 /error/403.html;
            error_page 404 /error/404.html;
            error_page 405 /error/405.html;
            error_page 500 /error/500.html;
            error_page 502 /error/502.html;
            error_page 503 /error/503.html;
            recursive_error_pages on;
            location = /error/400.html {
    
                internal;
            }
            location = /error/401.html {
    
                internal;
            }
            location = /error/403.html {
    
                internal;
            }
            location = /error/404.html {
    
                internal;
            }
            location = /error/405.html {
    
                internal;
            }
            location = /error/500.html {
    
                internal;
            }
            location = /error/502.html {
    
                internal;
            }
            location = /error/503.html {
    
                internal;
            }
    
            error_log /var/log/ispconfig/httpd/zerotrace.tk/error.log;
            access_log /var/log/ispconfig/httpd/zerotrace.tk/access.log combined;
    
            location ~ /\. {
                deny all;
                access_log off;
                log_not_found off;
            }
    
            location = /favicon.ico {
                log_not_found off;
                access_log off;
            }
    
            location = /robots.txt {
                allow all;
                log_not_found off;
                access_log off;
            }
    
            location /stats {
    
                index index.html index.php;
                auth_basic "Members Only";
                auth_basic_user_file /var/www/clients/client1/web2/web/stats/.htpasswd_stats;
            }
    
            location ^~ /awstats-icon {
                alias /usr/share/awstats/icon;
            }
    
            location ~ \.php$ {
                try_files /62212203e9607ad389cd0d9fe52fdd57.htm @php;
            }
    
            location @php {
                try_files $uri =404;
                include /etc/nginx/fastcgi_params;
                fastcgi_pass 127.0.0.1:9011;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                fastcgi_intercept_errors on;
            }
    
            location /cgi-bin/ {
                try_files $uri =404;
                include /etc/nginx/fastcgi_params;
                root /var/www/clients/client1/web2;
                gzip off;
                fastcgi_pass  unix:/var/run/fcgiwrap.socket;
                fastcgi_index index.cgi;
                fastcgi_param SCRIPT_FILENAME  $document_root$fastcgi_script_name;
                fastcgi_intercept_errors on;
            }

    What can i do now ?? I can't access any created site . just the default page .


     
  2. foxpro

    foxpro New Member

    Problem Solved by My self .

    There is some error in nginx itself .

    cat /var/log/nginx/error.log

    Code:
    [B]2013/09/08 02:12:03 [emerg] 2859#0: could not build the server_names_hash, you should increase server_names_hash_bucket_size: 32
    2013/09/08 02:53:03 [emerg] 3778#0: could not build the server_names_hash, you should increase server_names_hash_bucket_size: 32
    2013/09/08 02:53:03 [emerg] 3779#0: could not build the server_names_hash, you should increase server_names_hash_bucket_size: 32[/B]

    So i nano /etc/nginx/nginx.conf and comment out server_names_hash_bucket_size 64; where there was a # which i had to remove . and then restarted nginx by service nginx restart ... wait a bit to acceess your site .
     
  3. almere

    almere Member HowtoForge Supporter

    You should set server_names_hash_bucket_size to 32 in your ngixn conf
     

Share This Page