Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Mon Feb 24, 2014 12:15 pm 
Offline
Newbie

Joined: Mon Feb 24, 2014 12:01 pm
Posts: 2
A little background: I just got my linode on Sunday and installed it using the LAMP StackScript (Ubuntu 12.04). Apache works, and PHP appears to be working (I created a test page that gave me php info). I then created a virtual name host to MySite.com (example name of course) which has a DocumentRoot of /home/mysite/public_html

Now I'm installing wordpress. Things seemed to go okay, process went through just fine, brought me to the admin login page, yay. However, when I attempt to go to mysite.com, a file (download.php) is downloaded. If I try to to IPAddress/mysite I download the same file. IPAddress/mysite/index.php, it downloads index.php.

I've done some googling and seen other people with the same problem, so I added the following to the end of my apache2.conf file:
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

Restarted apache and....no difference. If I go to my regular site (IPAddress or the Linodename), I get the temporary index.html file I put up

After working on this for several hours, I'm just plain confused. I haven't really had issues with this before on a past server, so I'm assuming it's just a configuration option I messed up. Any thoughts/suggestions that can point me in the right way?

Thanks
H


Top
   
PostPosted: Tue Feb 25, 2014 5:15 pm 
Offline
Senior Member

Joined: Mon Jan 02, 2012 12:45 pm
Posts: 365
H,
Instead of
Code:
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

try this
Code:
AddHandler php5-script .php .html .htm
AddType text/html .php .html .htm

and restart apache. It's what I have at the end of my U 12.04 apache2.conf file.

I've never used the -source or .phps extensions, so if my suggestion works - and you want/need the .phps extension - you may just have to find a syntax that matches.


Top
   
PostPosted: Thu Feb 27, 2014 9:34 am 
Offline
Newbie

Joined: Mon Feb 24, 2014 12:01 pm
Posts: 2
After some fustrating times with it, I ended up reloading my host and installing LAMP by hand, rather then using the stack script. That seemed to work out.

I did notice that if I turn on the userdir mod, it attempts to grab the php files as well. Turns out userdir mod had the php engine turned off. Simply commented out the code (as per http://devplant.net/2010/05/04/linux-ph ... blic_html/ ) and it worked.

Thanks for the suggestion though.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


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

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group