I know this people have gone over this a thousand times, but I simply can't get my browser to resolve to 127.0.0.1 when I type in my domain name.
I'm developing a WP site locally. Getting to it by typing localhost works just fine, but when I type in the domain name, it won't resolve to localhost.
Can some one help me please?
/etc/hosts:
127.0.0.1 localhost thewriters.ink
/etc/apache2/apache2.conf:
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>
<Directory /usr/share>
AllowOverride None
Require all granted
</Directory>
<Directory /var/www/html>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
/etc/apache2/sites-available/thewriterink.conf:
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ServerName thewriters.ink
ServerAlias thewriters.ink
ServerAdmin [email protected]
DocumentRoot /var/www/html
<Directory /var/www/html>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log com
</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
The reason I'm trying to do this is because I want the links within the website to be http://thewriters.ink and for plugins to use that URL so I don't have to go back and manually change dozens of links when its uploaded to the production server.
(I've disabled 000-default.conf and enabled thewritersink.conf using a2dissite and a2ensite.)
Thanks all for your help.
Robot876