Welcome! Log In Create A New Profile

Advanced

server_name site.ru *.site.ru;

November 06, 2011 09:40AM
Проблема такая :

Домен - site.ru виден в интернете, www.site.ru - тоже виден
Алиасы для site.ru прописаны как *.site.ru
Но запрос любого вида (кроме site.ru и www.site.ru), например poddomen.site.ru,
улетает в никуда ответ - Сервер не найден


Часть конфига для site.ru :

server {
listen xx.xx.xx.xx:80;
server_name site.ru *.site.ru;

error_page 404 = @fallback;
location ~* ^/(webstat/|awstats|webmail/|myadmin/|manimg/) {
proxy_pass http://xx.xx.xx.xx:8080;
proxy_redirect http://site.ru:8080/ /;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
}
location / {
proxy_pass http://xx.xx.xx.xx:8080;
proxy_redirect http://site.ru:8080/ /;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
}
location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar)$ {
root /home/i/data/www/site.ru;
access_log /home/httpd-logs/site.ru.access.log ;
access_log /home/nginx-logs/i isp;
}
location @fallback {
proxy_pass http://xx.xx.xx.xx:8080;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
}
}

с конфига апача

<VirtualHost xx.xx.xx.xx:8080>
ServerName site.ru
DocumentRoot /home/i/data/www/site.ru
AssignUserID i i
CustomLog /home/httpd-logs/site.ru.access.log combined
ErrorLog /home/httpd-logs/site.ru.error.log
ServerAlias *.site.ru
php_admin_value open_basedir "/home/i/data:."
php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f xxxx"
php_admin_value upload_tmp_dir "/home/i/data/mod-tmp"
php_admin_value session.save_path "/home/i/data/mod-tmp"
AddType application/x-httpd-php .php .php3 .php4 .php5 .phtml
AddType application/x-httpd-php-source .phps
Alias /manager/ "/home/i/data/www/site.ru/manager/"
</VirtualHost>

Есть ли ошибки в этом куске httpd.conf созданным ispmanager ?
Subject Author Posted

server_name site.ru *.site.ru;

in_do November 06, 2011 09:40AM

Re: server_name site.ru *.site.ru;

Maxim Dounin November 07, 2011 12:30PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 86
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready