LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 03-01-2014, 03:12 PM   #16
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled

Here's what I did:
installed. Debian 7.0.4 - No desktop. Web Server and mysql-server.

Code:
apache2 -version | head -1 && cat /var/www/index.html
Server version: Apache/2.2.22 (Debian)
<html><body><h1>It works!</h1>
<p>This is the default web page for this server.</p>
<p>The web server software is running but no content has been added, yet.</p>
</body></html>

cd /var/www
wget http://wordpress.org/latest.tar.gz
tar ztf latest.tar.gz
shows:
wordpress/ as the directory prefix, soooooooooooooooo....wishing to be of further help, I untar'd it and moved everything up one directory to /var/www and re-edited /etc/apache2/sites-enabled/000-default using:
Code:
DocumentRoot /var/www
...
                <Directory /var/www/>
                Options Indexes FollowSymLinks MultiViews
                DirectoryIndex index.php
and bounced apache again.
with
Code:
service apache2 restart
and voilá!
Wordpress at http://192.168.1.4/

Hope that's helpful.

JJ

Last edited by Habitual; 06-26-2015 at 05:47 PM.
 
Old 03-01-2014, 05:02 PM   #17
Ryanms3030
Member
 
Registered: Jan 2014
Distribution: Debian, Mint, CentOS, Ubuntu
Posts: 261

Original Poster
Rep: Reputation: Disabled
I solved it. Maybe not the most elegant solution but I just had to remove the index.html file in /var/www and restart apache. Now apache is looking at the index.php which is my wordpress site. I didn't actually remove the .html , just renamed. Thanks for all the help here, forced me to read up on some more stuff I didn't know about and learn.
 
Old 03-01-2014, 05:04 PM   #18
Ryanms3030
Member
 
Registered: Jan 2014
Distribution: Debian, Mint, CentOS, Ubuntu
Posts: 261

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Habitual View Post
Here's what I did:
installed. Debian 7.0.4 - No desktop. Web Server and mysql-server.

Code:
apache2 -version | head -1 && cat /var/www/index.html
Server version: Apache/2.2.22 (Debian)
<html><body><h1>It works!</h1>
<p>This is the default web page for this server.</p>
<p>The web server software is running but no content has been added, yet.</p>
</body></html>

cd /var/www
wget http://wordpress.org/latest.tar.gz
tar ztf latest.tar.gz
shows:
wordpress/ as the directory prefix, soooooooooooooooo....wishing to be of further help, I untar'd it and moved everything up one directory to /var/www and re-edited /etc/apache2/sites-enabled/000-default using:
Code:
DocumentRoot /var/www
...
                <Directory /var/www/>
                Options Indexes FollowSymLinks MultiViews
                DirectoryIndex index.php
and bounced apache again.
with
Code:
service apache2 restart
and voilá!
Wordpress at http://192.168.1.4/

Hope that's helpful.

JJ

Thanks! That is helpfull as that is probably more elegant than my solution. It all will help when I eventually want to host two sites on the same server, which I will want to do
 
Old 03-01-2014, 05:34 PM   #19
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Quote:
Originally Posted by Ryanms3030 View Post
I solved it. ... I just had to remove the index.html file in /var/www and restart apache. Now apache is looking at the index.php which is my wordpress site. I didn't actually remove the .html , just renamed.
Great.

3 ways to correct this issue:
rename or remove /var/www/index.html or an explicit DirectoryIndex directive (that's my personal preference)
Code:
DirectoryIndex index.php
or
http://192.168.1.4/index.php would have "worked" also.

Apparently, there is an order of preference to
Code:
DirectoryIndex index.html index.php
which I did not realize.

Glad it worked out.
 
Old 03-01-2014, 05:48 PM   #20
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Quote:
Originally Posted by Ryanms3030 View Post
I decided to blow way this server and rebuild it with Debian 7 since that is what I'm running on my home server.

I installed and configured lamp, owncloud and wordpress and I'm at the same place. Wordpress works fine in the admin dashboard but when I got to my domain I get "it works"
To be fair, it was a waste of time, but not so much mine as yours.
Re-installing an OS to "fix" or correct a trivial issue such as this is never an answer.
DocumentRoot was not the issue as was the DirectoryIndex directive apparently has an order of precedence.

20 years and I'm still learning.
Sorry about the 'tude'.

Peace.
JJ
 
Old 03-01-2014, 08:18 PM   #21
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,323
Blog Entries: 28

Rep: Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141
Quote:
I didn't actually remove the .html , just renamed.
I think that is wise. If something happens and your WordPress has a bad day, it's handy to have an index page you can quickly edit appropriately, rename, and put into play while you go troubleshooting.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't export wordpress site harry_ord Programming 1 07-12-2013 03:27 PM
What's the most reliable FREE web hosting for WordPress blogging? tauro_kpo General 9 03-06-2012 03:54 AM
no email functionality on self-hosted wordpress site GTBlackwell Linux - Server 0 08-12-2009 09:02 AM
Redirecting Apache2 to Wordpress site by default GTBlackwell Linux - Software 1 09-11-2008 02:45 AM
do I really need virtual hosting if only hosting one site kustomjs Linux - Server 8 05-22-2008 12:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 11:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration