I'm having trouble to configure a new named based virtualServer on my server and i can't figure out why, any help would be most welcome....
So i have this server where a virtual server, there named prealp.msh-alpes.fr is working very well. I need to add a new virtualserver named enquetes-screen.msh-alpes.fr. I created a file in /var/www/enquetes-screen, chmod it in 755 the configure the rest like this :
my /etc/hosts file :
127.0.0.1 localhost
195.221.00.00 tyrion.msh-alpes.fr tyrion
195.221.00.00 prealp.msh-alpes.fr prealp
195.221.00.00 enquetes-screen.msh-alpes.fr enquetes-screen.msh-alpes.fr
My /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 152.77.00.00
nameserver 195.83.00.00
search msh-alpes.fr enquetes-screen.msh-alpes.fr
So this is my conf file in /etc/apache2/sites-available/prealp.conf
<VirtualHost *:80>
ServerAdmin webmaster@msh-alpes.fr
DocumentRoot /var/www/prealp
ServerName prealp.msh-alpes.fr
<Directory /var/www/prealp>
Options -Indexes
AllowOverride All
</Directory>
LogLevel warn
ErrorLog /var/log/apache2/error-prealp.log
CustomLog /var/log/apache2/access-prealp.log combined
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster@msh-alpes.fr
DocumentRoot /var/www/file
ServerName enquetes-screen.msh-alpes.fr
<Directory /var/www/limesurvey>
Options -Indexes
AllowOverride All
</Directory>
LogLevel warn
ErrorLog /var/log/apache2/error-limesurvey.log
CustomLog /var/log/apache2/access-limesurvey.log combined
</VirtualHost>
NameVirtualHost *:443
<VirtualHost *:443>
ServerAdmin webmaster@msh-alpes.fr
DocumentRoot /var/www/prealp
ServerName prealp.msh-alpes.fr
SSLEngine on
SSLCertificateFile /etc/ssl/certs/cert-28559-prealp.msh-alpes.fr.pem
SSLCertificateKeyFile /etc/ssl/private/prealp.msh-alpes.fr.key
SSLCertificateChainFile /etc/apache2/ssl.crt/chain-28559-prealp.msh-alpes.fr.pem
<Directory /var/www/prealp>
Options -Indexes
AllowOverride All
</Directory>
LogLevel warn
ErrorLog /var/log/apache2/error-prealp-ssl.log
CustomLog /var/log/apache2/access-prealp-ssl.log combined
</VirtualHost>
<VirtualHost *:443>
ServerName
enquetes-screen.msh-alpes.fr
ServerAlias www.enquetes-screen.msh-alpes.fr
ServerAdmin admin@msh-alpes.fr
DocumentRoot /var/www/file
SSLEngine on
SSLCertificateFile /etc/ssl/certs/enquetes-screen_msh-alpes_fr.crt
SSLCertificateKeyFile /etc/ssl/private/enquetes-screen.msh-alpes.fr.key
SSLCertificateChainFile /etc/apache2/ssl.crt/DigiCertCA.crt
LogLevel warn
ErrorLog /var/log/apache2/error-enquetes-screen-ssl.log
CustomLog /var/log/apache2/access-enquetes-screen-ssl.log combined
</VirtualHost>
I also tried to separate into two conf file site1.conf and newsite.conf without success
The result of apache2ctl -t
return a syntax ok.
Then a2ensite prealp.conf
and /etc/init.d/apache2 reload
are going fine too.
the result of apachectl -S
return
VirtualHost configuration:
*:80 is a NameVirtualHost
default server analytics.msh-alpes.fr (/etc/apache2/sites-enabled/analytics.conf:1)
port 80 namevhost analytics.msh-alpes.fr (/etc/apache2/sites-enabled/analytics.conf:1)
port 80 namevhost prealp.msh-alpes.fr (/etc/apache2/sites-enabled/prealp.conf:1)
port 80 namevhost enquetes-screen.msh-alpes.fr (/etc/apache2/sites-enabled/prealp.conf:19)
*:443 is a NameVirtualHost
default server prealp.msh-alpes.fr (/etc/apache2/sites-enabled/prealp.conf:38)
port 443 namevhost prealp.msh-alpes.fr (/etc/apache2/sites-enabled/prealp.conf:38)
port 443 namevhost enquetes-screen.msh-alpes.fr (/etc/apache2/sites-enabled/prealp.conf:61)
alias www.enquetes-screen.msh-alpes.fr
but the nslookup enquetes-screen.msh-alpes.fr
still return
** server can't find enquetes-screen.msh-alpes.fr: NXDOMAIN
I've been looking for a while now and i have no idea why this doesn't work....Is there something obvious i'm missing ? i'm quite new to this so any help would be most welcome...
enquetes-screen.msh-alpes.fr
. Related topics: https://askubuntu.com/q/900523/566421 and https://askubuntu.com/q/941299/566421 – pa4080 Jun 26 '18 at 08:08