Issue in setting up different port for multiple sites in my Ubuntu 16.04 VPS using LAMP.
Below are the configurations i have used:
etc\apache2\ports.conf
# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default.conf
#NameVirtualHost *:80
Listen 80
Listen 1000
<IfModule ssl_module>
Listen 443
</IfModule>
<IfModule mod_gnutls.c>
Listen 443
</IfModule>
etc\apache2\sites-available\000-default.conf
<VirtualHost:80>
//Default config here
</VirtualHost>
<VirtualHost *:1000>
ServerName localhost
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/My_Site
<Directory /var/www/html/My_Site>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Problem is :
a) if i service apache2 reload the configurations given above isnt reflecting in etc\apache2\sites-enabled\000-default.conf
b) My custom port 1000 seems to be listening, but the apache2's default homepage is loading by hitting by IP.
1) Is my document root : DocumentRoot /var/www/html/My_Site correct?
Suggestion appreciated!!
<VirtualHost>
should of course be<VirtualHost *:80>
, no? – AlexP Nov 23 '16 at 12:15