I have a Wordpress site I want to host out of a Ubuntu LAMP server.
I currently have Webmin configured using a subdomain. I have a webmin.mydomain1.com pointing to the IP of the LAMP server.
I can access Webmin just fine using the subdomain.
Domain2.com is the domain for the Wordpress site. I currently have an A record for domain2.com "@ IP.OF.SERVER" pointing to the LAMP server. Domain2.com resolves to the LAMP server's IP.
When I try to browse to domain2.com I get " Invalid URL The requested URL "[no URL]", is invalid."
When I navigate to webmin.domain1.com/domain2.com/public_html I get served the Wordpress files.
So, I can use the subdomain followed by the Wordpress directory to access the Wordpress site, but not Wordpress domain (domain2.com) itself.
I would assume that I have my A record/CNAME screwed up somewhere.
Any ideas?
I currently have Webmin configured using a subdomain. I have a webmin.mydomain1.com pointing to the IP of the LAMP server.
I can access Webmin just fine using the subdomain.
Domain2.com is the domain for the Wordpress site. I currently have an A record for domain2.com "@ IP.OF.SERVER" pointing to the LAMP server. Domain2.com resolves to the LAMP server's IP.
When I try to browse to domain2.com I get " Invalid URL The requested URL "[no URL]", is invalid."
When I navigate to webmin.domain1.com/domain2.com/public_html I get served the Wordpress files.
So, I can use the subdomain followed by the Wordpress directory to access the Wordpress site, but not Wordpress domain (domain2.com) itself.
I would assume that I have my A record/CNAME screwed up somewhere.
Any ideas?
Code:
<VirtualHost *:80> # The primary domain for this host ServerName example1.com # Optionally have other subdomains also managed by this Virtual Host ServerAlias example1.com *.example1.com DocumentRoot /var/www/html/example1.com/public_html <Directory /var/www/html/example1.com/public_html> Require all granted # Allow local .htaccess to override Apache configuration settings AllowOverride all </Directory> # Enable RewriteEngine RewriteEngine on RewriteOptions inherit # Block .svn, .git RewriteRule \.(svn|git)(/)?$ - [F] # Catchall redirect to www.example1.com RewriteCond %{HTTP_HOST} !^www.example1\.com [NC] RewriteCond %{HTTP_HOST} !^$ RewriteRule ^/(.*) https://www.example1.com/$1 [L,R] # Recommended: XSS protection <IfModule mod_headers.c> Header set X-XSS-Protection "1; mode=block" Header always append X-Frame-Options SAMEORIGIN </IfModule> </VirtualHost>
Last edited: