Bằng cách nào đó file máy chủ ảo tôi không làm việc thẳng tôi không thể nói lý do tại sao - Tôi đặt cược nó chỉ là một mailfunction trong não tốt buổi sáng của tôi: pApache Virtual Host không hoạt động đúng
Ngay bây giờ tôi có hai trang web kích hoạt thông qua một liên kết tượng trưng đến các trang web có sẵn trong/etc/apache2/thư mục như:
0 Nov 21 12:24 000-default -> ../sites-available/default
0 Nov 21 14:52 001-site -> ../sites-available/site
vhosts tôi file như sau:
DEFAULT
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName (the IP Address from my Server)
ServerAlias (the 2nd IP Address from my Server)
DocumentRoot /var/www/default
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/default>
Options FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
SITE
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /var/www/site/
ServerName jobbörse-köln.de
ServerAlias www.example.de ww.example.de w.example.de
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/site>
Options FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/site-error.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/site-access.log combined
</VirtualHost>
Bằng cách nào đó khi tôi đi vào "example.de" tôi nhận được vào thư mục mặc định thay cho SITE Directory. Ngay cả các tệp nhật ký:
site-error.log
site-access.log
giữ nguyên 0 byte ... tôi đang làm gì sai? Tôi đặt cược nó là một cái gì đó ngu ngốc và dễ dàng ...
tệp vhost.conf của bạn nằm ở đâu? bạn thấy gì khi truy cập trang web của mình? Thế còn httpd.conf của bạn thì sao? – Keerthivasan
file vhost tôi được đặt tại: /etc/apache2/sites-available và họ nhận được liên kết trong /etc/apache2/sites-enabled apache2.conf tôi nằm ở /etc/apache2/ Khi tôi đi trên www.example.de Tôi lấy index.php từ /var/www/default/ thay vì /var/www/site/ – Kris