I've got this little virtual machine with Debian GNU/Linux 9 Stretch and Apache2 working as a web server to try stuff. I redirected the local IP to "myserver.net" and configured a LAMP server, so everything was working great so far (PHP, MySQL, etc).
I want to learn Wordpress, so I tried to install Wordpress in a subfolder of my website named "blog" following this instructions and this other instructions.
I downloaded Wordpress, unzipped in the subfolder "blog" of my web root folder (public_html), create the DB, the user and run http://myserver.net/blog/wp-admin/install.php. Everything seemed to work fine, but ...
When I try http://myserver.net/blog/wp-admin/
I get this:
If I click in index.php I can log into the dashboard but when I try to access http://myserver.com/blog i get this:
After several hours googling I tried to do this:
- Load the rewrite and vhost_alias modules in Apache
- Change the URL from Settings in the dashboard to only myserver.com instead of myserver.com/blog
- Copy the .htaccess and index.php file to the public_html root folder.
- Modify the index.php to require( dirname( __FILE__ ) . '/blog/wp-blog-header.php' );
Nothing of this worked, i still can't access to the default Wordpress blog-like web page :(
This is my Apache conf file in sites-enabled:
<VirtualHost *:80>
ServerAdmin webmaster@myserver.net
ServerName myserver.net
ServerAlias www.myserver.net
DocumentRoot /mnt/web/myserver/public_html/
ErrorLog /mnt/web/myserver/logs/error.log
CustomLog /mnt/web/myserver/logs/access.log combined
DirectoryIndex index.html
</VirtualHost>