nginx, wheezy, 3.0.5.2: alias web site issue

Discussion in 'ISPConfig 3 Priority Support' started by maumar, May 8, 2013.

  1. maumar

    maumar HowtoForge Supporter

    hello
    i have following issue with nginx and sebian wheezy:
    I tried to configure a web alias domain for nginx.
    I have attached a screenshot of the configured alias domain, and here it is the conf file

    Code:
    
    server {
            listen *:80;
    
    
            server_name new.incisivo.it www.new.incisivo.it www.incisivo.it incisivo.it;
    
            root   /var/www/new.incisivo.it/web;
    
    
    
            location / {
                    try_files $uri $uri/ /index.php?$args;
            }
    
           # Add trailing slash to */wp-admin requests.
           rewrite /wp-admin$ $scheme://$host$uri/ permanent;
    
            location ~* \.(jpg|jpeg|png|gif|css|js|ico)$ {
                    expires max;
                    log_not_found off;
            }
    
    
           include /var/www/new.incisivo.it/web/nginx.conf;
    
            location ~ /nginx.conf {
                            deny all;
                            access_log off;
                            log_not_found off;
            }
    
    
    
    
            if ($http_host ~* "dentista-pavia.com$") {
                rewrite ^/(.+)$ http://www.incisivo.it/dentista-pavia$1 ;
            }
    
            if ($http_host ~* "www.dentista-pavia.com$") {
                rewrite ^/(.+)$ http://www.incisivo.it/dentista-pavia$1 ;
            }
    
    [...]
    

    as you can easily see, there are the rewrite (it's ok!) but I can't fine any server alias declaration.

    When i try url: http://www.dentista-pavia.com/
    I get ispconfig default page, as you can yourself try.

    I have this and other issue with nginx by the time I have upgraded to 3.0.5.2.
     
  2. maumar

    maumar HowtoForge Supporter

    i forget to attach screenshot, please be patient
     

    Attached Files:

  3. falko

    falko Super Moderator

    Can you post the full vhost file? I guess there's a second server {} container at the end for the alias domains.
     
  4. maumar

    maumar HowtoForge Supporter

    Hello Falko
    sadly there is no other server {} declaration for alias, here it the complete vhost file:

    Code:
    
    server {
            listen *:80;
    
    
            server_name new.incisivo.it www.new.incisivo.it www.incisivo.it incisivo.it
                            dentista-pavia.com www.incisivo.it/dentista-pavia;
    
            root   /var/www/new.incisivo.it/web;
    
    
    
            location / {
                    try_files $uri $uri/ /index.php?$args;
            }
    
           # Add trailing slash to */wp-admin requests.
           rewrite /wp-admin$ $scheme://$host$uri/ permanent;
    
            location ~* \.(jpg|jpeg|png|gif|css|js|ico)$ {
                    expires max;
                    log_not_found off;
            }
    
    
           include /var/www/new.incisivo.it/web/nginx.conf;
    
            location ~ /nginx.conf {
                            deny all;
                            access_log off;
                            log_not_found off;
            }
    
    
    
    
            if ($http_host ~* "dentista-pavia.com$") {
                rewrite ^/(.+)$ http://www.incisivo.it/dentista-pavia$1 ;
            }
    
            if ($http_host ~* "www.dentista-pavia.com$") {
                rewrite ^/(.+)$ http://www.incisivo.it/dentista-pavia$1 ;
            }
    
            if ($http_host ~* "dentista-piacenza.com$") {
                rewrite ^/(.+)$ http://www.incisivo.it/dentista-piacenza$1 ;
            }
    
            if ($http_host ~* "www.dentista-piacenza.com$") {
                rewrite ^/(.+)$ http://www.incisivo.it/dentista-piacenza$1 ;
            }
    
            if ($http_host ~* "dentistapiacenza.com$") {
                rewrite ^/(.+)$ http://www.incisivo.it/dentistapiacenza$1 ;
            }
    
            if ($http_host ~* "www.dentistapiacenza.com$") {
                rewrite ^/(.+)$ http://www.incisivo.it/dentistapiacenza$1 ;
            }
    
            if ($http_host ~* "dentisti-indipendenti-milano.com$") {
                rewrite ^/(.+)$ http://www.incisivo.it/dentisti-indipendenti-milano$1 ;
            }
    
            if ($http_host ~* "www.dentisti-indipendenti-milano.com$") {
                rewrite ^/(.+)$ http://www.incisivo.it/dentisti-indipendenti-milano$1 ;
            }
    
            if ($http_host ~* "dentisti-pavia.com$") {
                rewrite ^/(.+)$ http://www.incisivo.it/dentisti-pavia$1 ;
            }
    
            if ($http_host ~* "www.dentisti-pavia.com$") {
                rewrite ^/(.+)$ http://www.incisivo.it/dentisti-pavia$1 ;
            }
    
            if ($http_host ~* "dentistiindipendentimilano.com$") {
                rewrite ^/(.+)$ http://www.incisivo.it/dentistiindipendentimilano$1 ;
            }
    
            if ($http_host ~* "www.dentistiindipendentimilano.com$") {
                rewrite ^/(.+)$ http://www.incisivo.it/dentistiindipendentimilano$1 ;
            }
    
            if ($http_host ~* "sbiancamento-denti-milano.com$") {
                rewrite ^/(.+)$ http://www.incisivo.it/sbiancamento-denti-milano$1 ;
            }
    
            if ($http_host ~* "www.sbiancamento-denti-milano.com$") {
                rewrite ^/(.+)$ http://www.incisivo.it/sbiancamento-denti-milano$1 ;
            }
    
            index index.html index.htm index.php index.cgi index.pl index.xhtml;
    
    
    
            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/new.incisivo.it/error.log;
            access_log /var/log/ispconfig/httpd/new.incisivo.it/access.log combined;
    
            ## Disable .htaccess and other hidden files
            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/client4/web1150/web/stats/.htpasswd_stats;
            }
    
            location ^~ /awstats-icon {
                alias /usr/share/awstats/icon;
            }
    
    
            location ~ \.php$ {
                try_files $uri =404;
                include /etc/nginx/fastcgi_params;
                fastcgi_pass 127.0.0.1:10159;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                fastcgi_param PATH_INFO $fastcgi_script_name;
            }
    
    
    }
    
    
     
  5. maumar

    maumar HowtoForge Supporter

    Hello Falko

    do you think this is a bug and should I file a bug on bugzilla?
     
  6. maumar

    maumar HowtoForge Supporter

    with a fresh installation:
    debian wheezy
    Code:
    http://www.howtoforge.com/perfect-server-debian-wheezy-nginx-bind-dovecot-ispconfig-3-p5
    
    multiserver, it's ok.
    Then, the issue is with upgrade of a
    debian7 with 3.0.4.6 -> debian7 with 3.0.5.2
     
  7. till

    till Super Moderator

    Did you modify the vhost template file from ispconfig or are there any files in the directory /usr/local/ispconfig/server/conf-custom/ ?
     

Share This Page