I have a ubuntu server with LAMPP Installed.
its configuration file /opt/lampp/etc/httpd.conf includes the vhost configuration file already.
- Code: Select all
# Virtual hosts
Include etc/extra/httpd-vhosts.conf
its httpd-vhost.conf file has a definition below
- Code: Select all
<VirtualHost phptutorial.com:8080>
DocumentRoot "/opt/lampp/htdocs/phptutorial.com"
# DirectoryIndex index.php
ServerName phptutorial.com
ServerAlias phptutorial.com
ErrorLog "logs/phptutorial.com-error_log"
CustomLog "logs/phptutorial.com-access_log" common
<Directory /opt/lampp/htdocs/phptutorial.com>
# Options All
# Require all granted
# AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
the ubuntu host file has
127.0.0.1 localhost
127.0.1.1 devsvr devsvr
192.168.1.1 phptutorial.com
while the client workstation has its host file
192.168.1.1 phptutorial.com
however when I visit the http://192.168.1.1:8080 i get redirected to http://phptutorial.com:8080/dashboard/ not to the contents of "/opt/lampp/htdocs/phptutorial.com" defined in the vhost file.