I am just starting working with Apache 2, and I have made a virtual host called wj9studios.dev
. When I try to access it from the browser, it gives me 'Unable to Connect'. However, if I use Ping or cURL, it works just fine. This is my wj9studios.dev.conf:
<VirtualHost *:80>
ServerAdmin admin@wj9studios.dev
ServerName wj9studios.dev
ServerAlias www.wj9studios.dev
DocumentRoot /var/www/wj9studios.dev
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
The output of apache2ctl -S:
AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/ports.conf:5
VirtualHost configuration:
*:80 wj9studios.dev (/etc/apache2/sites-enabled/wj9studios.dev.conf:1)
ServerRoot: "/etc/apache2"
Main DocumentRoot: "/var/www/wj9studios.dev"
Main ErrorLog: "/var/log/apache2/error.log"
Mutex default: dir="/var/run/apache2/" mechanism=default
Mutex watchdog-callback: using_defaults
PidFile: "/var/run/apache2/apache2.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="www-data" id=33 not_used
Group: name="www-data" id=33 not_used
Edit: I'm using /etc/hosts for dns, if that clears anything up