2

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: Image 1

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: Image 2

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>
mario
  • 144,265
  • 20
  • 237
  • 291
T.Juan
  • 23
  • 1
  • 5
  • 1
    What's `DirectoryIndex` set to? – mario Nov 17 '17 at 00:08
  • DirectoryIndex index.html. I'm going to try to set it to index.php – T.Juan Nov 17 '17 at 00:17
  • Ok. I repeated all the things above and add "index.php" to DirectoryIndex and now it's working!!! Thank you Mario, you pointed me in the right direction. – T.Juan Nov 17 '17 at 00:26
  • Alirght. I'm gonna close this then. -- Even if it turned out trivial, well-written first question nonetheless! Welcome to SO. – mario Nov 17 '17 at 00:29

0 Answers0