У меня есть 2 записи в файле с 000 значениями по умолчанию. Один из них о субдомене, и другой обо всем остальном. Проблема состоит в том, что просто каждый работает, что является первым в файле. Таким образом, если я пишу сначала запись субдомена, которая работает если другой затем это.
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
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
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
<Location /svn>
DAV svn
SVNParentPath /home/svn
AuthType Basic
AuthName "Your repository name"
AuthUserFile /etc/subversion/passwd
Require valid-user
SVNPathAuthz On
# SVNAdvertiseV2Protocol Off
</Location>
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName sub.domain.com
ServerAlias sub.domain.com
DocumentRoot /var/www/sub.domain
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/sub.domain/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride All
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
RewriteEngine On
Báðir eru að vinna fyrir mig rétt ServerAdmin vefstjóri @ localhost ServerName puppetmaster.matrix.nx DocumentRoot / var / www / html Valkostir FollowSymLinks AllowOverride Engin Valkostir Vísitölur FollowSymLinks MultiViews AllowOverride All Pöntun leyfir, afneitar leyfa frá öllum
ServerAdmin vefstjóri @ localhost ServerName puppet.matrix.nx ServerAlias puppet.matrix.nx
DocumentRoot /var/www/sub.domain
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/sub.domain/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
[root @ puppetmaster conf.d] # FÁ http: //puppetmaster.matrix.nx/ prófunarsíða1
[root @ puppetmaster conf.d] # FÁ http: //puppet.matrix.nx/ prufusíða2