Я знаю, что эти люди проходили через это тысячу раз, но я просто не могу заставить свой браузер разрешить 127.0.0.1, когда я ввожу свое доменное имя.
Я разрабатываю сайт WP локально.Чтобы добраться до него, набрав localhost, работает нормально, но когда я ввожу имя домена, оно не будет преобразовано в localhost.
Кто-нибудь может мне помочь?
/ 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 admin@ethewriters.ink
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
Причина, по которой я пытаюсь это сделать, заключается в том, что я хочу, чтобы ссылки на веб-сайте были http://thewriters.ink и чтобы плагины использовали этот URL-адрес, чтобы Мне не нужно возвращаться и вручную менять десятки ссылок при их загрузке на рабочий сервер.
(Я отключил 000-default.conf и включил thewritersink.conf, используя a2dissite и a2ensite.)
Всем спасибо за вашу помощь.
Robot876