Correct virtualhost setup for both nextjs and wordpress setup
Correct virtualhost setup for both nextjs and wordpress setup
I have the below configuration file in Apache
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName demo.com
DocumentRoot /var/www/html/demo
ServerAlias demo.com
ErrorLog /var/www/html/error.log
CustomLog /var/www/html/requests.log combined
ProxyRequests Off
ProxyPreserveHost On
ProxyVia Full
<Proxy *>
Require all granted
</Proxy>
<Location />
ProxyPass http://localhost:3000/
ProxyPassReverse http://localhost:3000/
</Location>
<Location /blog/>
ProxyPass !
ProxyPassReverse !
</Location>
Alias "/blog" "/var/www/html/blog"
<Directory "/var/www/html/blog">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
SSLCertificateFile /etc/letsencrypt/live/demo.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/demo.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>
And below code in .htaccess file inside blog folder
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /blog/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
</IfModule>
I'm not able to access the URL https://demo.com/blog but I can access https://demo.com/blog/test-post/ and https://demo.com/blog/wp-admin/ etc what could be the issue?
Turbo Multi-language Translator
Make the better internet purchasing globaly
Turbosify SEO Speed Booster
5.0 (7)•Free plan available
Get better conversions by improving store loading speed
Installed
Turbo Multi-language Chat - AI Customer service in one hand