Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Wordpress on Virtual Host under LAMP stack[solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
tenspd1370
Tux's lil' helper
Tux's lil' helper


Joined: 14 Dec 2017
Posts: 119

PostPosted: Mon Jan 15, 2018 12:17 am    Post subject: Wordpress on Virtual Host under LAMP stack[solved] Reply with quote

Hi all -

I followed the instructions for installing wordpress:

https://wiki.gentoo.org/wiki/WordPress

and was able to get things running, but I wanted to create everything under a virtual host. My virtual host setup works if I navigate to it - it shows the apache "It works" page. Whebn I install wordpress to a virtual host, in this example:

webapp-config -h wvhs-test.dev -d wordpress -I wordpress 4.9.1

I get a directory /var/www/wvhs-test.dev with a htdocs/wordpress subdirectory. The virtual host is configured like so:

in 00_default_vhost.conf
Code:

<VirtualHost *:80>
        ServerName wvhs-test.dev
        Include /etc/apache2/vhosts.d/wvhs-test_vhost.include

        <IfModule mpm_peruser_module>
                ServerEnvironment apache apache
        </IfModule>
</VirtualHost>



and in wvhs-test_vhost.include

Code:

ServerAdmin root@localhost
DocumentRoot "/var/www/wvhs-test.dev/htdocs"
<Directory "/var/www/wvhs-test.dev/htdocs">
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted
</Directory>

<IfModule alias_module>
     ScriptAlias /cgi-bin/ "/var/www/wvhs-test.dev/cgi-bin/"
</IfModule>
<Directory "/var/www/wvhs-test.dev/cgi-bin">
        AllowOverride None
        Options None
        Require all granted
</Directory>

basically copied the example and made changes.

I can put the "It works" index.html in /var/www/wvhs-test.dev/htdocs/ and type wvhs-test.dev in Firefox and get the "It Works" page. But if I go to http://wvhs-test.dev/wordpress, I get a 404 error /wordpress/ not found and in the url bar it says localhost/wordpress. In other words, I can't get to /var/www/wvhs-test.dev/htdocs/wordpress to set everything up.

I have tried setting up the database with a `wordpress`@`localhost` user and a `wordpress`@`wvhs-test.dev` user with no luck. Can anyone help me figure out what I am missing?

Thanks!


Last edited by tenspd1370 on Fri Jan 19, 2018 4:12 am; edited 1 time in total
Back to top
View user's profile Send private message
tenspd1370
Tux's lil' helper
Tux's lil' helper


Joined: 14 Dec 2017
Posts: 119

PostPosted: Mon Jan 15, 2018 1:15 am    Post subject: Reply with quote

Not sure what this implies, but when I try

wvhs-test.dev/wordpress/index.php it starts up a page. Maybe that will help in diagnosing the problem or what I have done wrong.

**** In firefox, switched system proxy to no proxy and and putting in wvhs-test.dev/wordpress/ worked like it should (so far). Going to leave this open for now because I would kind of like to understand why. ****


Thaks again!
Back to top
View user's profile Send private message
chiefbag
Guru
Guru


Joined: 01 Oct 2010
Posts: 542
Location: The Kingdom

PostPosted: Mon Jan 15, 2018 9:26 am    Post subject: Reply with quote

Try changing:

Code:
DocumentRoot "/var/www/wvhs-test.dev/htdocs"
<Directory "/var/www/wvhs-test.dev/htdocs">


TO:

Code:
DocumentRoot "/var/www/wvhs-test.dev/htdocs/wordpress"
<Directory "/var/www/wvhs-test.dev/htdocs/wordpress">
Back to top
View user's profile Send private message
tenspd1370
Tux's lil' helper
Tux's lil' helper


Joined: 14 Dec 2017
Posts: 119

PostPosted: Fri Jan 19, 2018 4:12 am    Post subject: Reply with quote

Sorry for the late reply - thanks! That did the trick.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum