Answer the question
In order to leave comments, you need to log in
apache virtual hosts configuration not applied?
Good afternoon, in the process of solving the problem with the error ""Publishing failed. Error message: Response is not a valid JSON response"" in wordpress, I began to edit the virtual host settings: /etc/apache2/sites-available/my-syte.ru. conf
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName my-syte.ru
ServerAlias www.my-syte.ru
DocumentRoot /var/www/my-syte.ru
<Directory /var/www/my-syte.ru/>
AllowOverride All
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =my-syte.ru [OR]
RewriteCond %{SERVER_NAME} =www.my-syte.ru
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
# Include generic snippets of statements
IncludeOptional conf-enabled/*.conf
# Include the virtual host configurations:
IncludeOptional sites-enabled/*.conf
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
Answer the question
In order to leave comments, you need to log in
/etc/apache2/sites-available - available configs
/etc/apache2/sites-enable - enabled configs
To enable the config
sudo a2ensite my-
syte.ru.conf in /etc/apache2/sites-available.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question