posiadam serwer dedykowany, dokupiłem drugą domenę z myślą podpięcia do niej drugiej, innej strony www. Niestety już za dużo nerwów na to straciłem, dlatego piszę tutaj.
Nie wiem czy wina leży po stronie apache, czy pomieszałem coś w bindzie. Dodałem 2 domenę (tutaj będzie to superexample.pl), tylko że nie wczytuje mi strony z tego katalogu, a przekierowuje to na https:// cloud.otherexample.net. A gdy np. wpiszę w pasku adresu smtp.otherexample.net (którego nie ma w virtual hostach), wtedy pokazuje mi zawartość katalogu, który powinien być pod superexample.pl .
Z jedną domeną wszystko działało jak chciałem, a teraz coś jest porypane, męcze to już kolejny dzień i brak efektów. Proszę aby ktoś rzucił na to okiem, bo ja mam już zaćmienie umysłu całkowite. Pewnie odpowiedź jest prosta. Niżej załączam konfigurację virtualhostów.
# superexample.pl <VirtualHost *:80> DocumentRoot /home/zielu/domains/superexample.pl/public_html ServerName www.superexample.pl ServerAlias superexample.pl *.superexample.pl <Directory /home/zielu/domains/superexample.pl/public/> Options -Indexes AllowOverride All Order allow,deny allow from all </Directory> # Logfiles ErrorLog /home/zielu/domains/superexample.pl/logs/error.log CustomLog /home/zielu/domains/superexample.pl/logs/access.log combined </VirtualHost> # otherexample.net <VirtualHost *:80> ServerName www.otherexample.net ServerAlias otherexample.net RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} </VirtualHost> <VirtualHost *:443> ServerName otherexample.net ServerAlias www.otherexample.net RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} # Indexes + Directory Root. DirectoryIndex index.html index.php DocumentRoot /home/zielu/domains/otherexample.net/private_html SSLEngine on SSLProtocol all -SSLv2 SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM SSLCertificateFile /etc/apache2/ssl/ssl.crt SSLCertificateChainFile /etc/apache2/ssl/sub.class1.server.ca.pem <Directory /home/www/ftp/domains/otherexample.net/private_html/> Options -Indexes AllowOverride All Order allow,deny allow from all </Directory> Alias /gitlist /opt/www/gitlist <Directory /opt/www/gitlist> Options -Indexes AllowOverride All Order allow,deny allow from all </Directory> # CGI Directory ScriptAlias /cgi-bin/ /home/zielu/domains/otherexample.net/cgi-bin <Location /cgi-bin> Options +ExecCGI </Location> # Logfiles ErrorLog /home/zielu/domains/otherexample.net/logs/error.log CustomLog /home/zielu/domains/otherexample.net/logs/access.log combined </VirtualHost> #cloud.otherexample.net <VirtualHost *:80> ServerName cloud.otherexample.net RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} </VirtualHost> <VirtualHost *:443> DocumentRoot /opt/www/owncloud ServerAdmin patryk@otherexample.net ServerName cloud.otherexample.net SSLEngine on SSLProtocol all -SSLv2 SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM SSLCertificateFile /etc/apache2/ssl/ssl.crt SSLCertificateChainFile /etc/apache2/ssl/sub.class1.server.ca.pem # Indexes + Directory Root. DirectoryIndex index.html index.php <Directory /opt/www/owncloud/> Options -Indexes AllowOverride All Order allow,deny allow from all </Directory> # CGI Directory ScriptAlias /cgi-bin/ /opt/www/owncloud/cgi-bin <Location /cgi-bin> Options +ExecCGI </Location> </VirtualHost> # mail.otherexample.net <VirtualHost *:80> RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} </VirtualHost> <VirtualHost *:443> ServerAdmin patryk@otherexample.net DocumentRoot /opt/www/roundcubemail SSLEngine on Alias /vimbadmin /opt/www/vimbadmin/public <Directory /opt/www/vimbadmin/public> Options FollowSymLinks AllowOverride None # For Apache <= 2.3: Include /etc/apache2/deny.conf # For Apache >= 2.4 # Require all granted SetEnv APPLICATION_ENV production RewriteEngine On RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] RewriteRule ^.*$ /vimbadmin/index.php [NC,L] </Directory> </VirtualHost>