After moving PHP files to /var/www they no longer are seen as hosted php files
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
After moving PHP files to /var/www they no longer are seen as hosted php files
I hope I have the right forum. I also did some googling beforehand, but I didn't find anything that helped me.
I am setting up a Demo website that I am hosting in a Debian Lenny VM, I have installed Apache, mySQL, and PHP5 I know the php server is working because if I place an info php file I can see it in the browser. However, I downloaded phpfusion, as well as phpmyadmin and they are on my desktop, I open a superuser file browser (also added write access to /var/www to everybody and copied the files over as me) and copied over the files. Once in the www folder they are no longer seen as "valid" php files, if I try to access them with iceweasel, IE, Konquerer it asks me if I want to download the file. If I look at the files on my desktop they have different icons. I have attached a screenshot. I can't tell what the difference is, but obviously there is one otherwise the icons wouldn't be different. Does anyone have any idea what's going on here or a way to rectify it? I have done things like this before without issue, I've never seen this problem.
Here is the ls -l /var/www output. I understand different themes and different DE will use different icons, however, notice that in the left windows all the files have the php icon, in the second with a different theme, one of the documents has the same icon but all the others have gone into like a text document preview mode. I will take a look at my apache config and post it as well in a proceeding post. I have never had an issue like this before.
Those configuration lines are in files in the conf.d directory. But now the plot thickens. I haven't done anything to the system but now I can't even access anything, I get a 403 forbidden trying to access anything in a browser.
you need to make a config for your php site and put it in /etc/apache2/sites-available/
then symlink it to /etc/apache2/sites-enabled
an example of a config would be /etc/apache2/sites-available/default
you can take that site and modify it then rename it to whatever then symlink it from /etc/apache2/sites-available/newsite to /etc/apache2/sites-enabled/newsite
It wasn't a new site it was part of the demo site I was putting together. But after I played with permissions and they all seemed to be ok, but I still got a 403 forbidden access error on every page I tried to access I just reinstalled the VM and none of these problems are occuring now. Thank you all for the help you provided though.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.