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.
I have lampp as well as apache2.
I can easily access my files using lampp but they are not accessible when they are in public_html.
My lampp is stopped and apache2 is running when I try to open them through public_html.
What am I doing wrong?
When you open php files using lampp. you say you are using xampp or lampp but what do say when you run it using httpd and access through public_html?
As you have said you have stopped XAMPP and start apache2.
I hope you have watched it carefully and it does not give error.
Another apache web server demon is running.
when I open http://localhost
It opens page "It works"
It looks like apache2 is working but when I try to open http://localhost/phpproject
It shows not found. It gives download link of index.php. The index.php in inside phpproject directory.
Although phpproject is inside /var/www.
I don't know why does it not find it?
Last edited by bloodstreetboy; 03-07-2013 at 05:28 AM.
Yes this line is already there in apache2.conf and it is not commented.
Although I have restarted apache2 and it still gives me download link of index.php.
Yes, the module has been installed already and it says "already installed".
Although I have restarted apache2 again and it still gives me download link of index.php.
Yes My SELinux is disabled already.
I already told you if it is php file, it shows me download box instead of opening it.
same for phpinfo.php
I don't want to download it and it gives me download link.
I know how is it opened, I have opened it in xampp.
It is not working here. thanks for reply.
If you can see "it works page", it means it can read the html but as you are saying it gives download link for index.php.
Some how it is not able to read php files. It looks like php modules are disabled.
Can you run following command?
Code:
$ sudo a2enmod php5
Check once /etc/apache2/mods-available, if there are php.conf and php.load, then run
I already told you if it is php file, it shows me download box instead of opening it.
same for phpinfo.php
I'm well aware that it is a PHP file, with the phpinfo.php file I was starting with a known method of checking that your php modules for apache were correctly installed.
They aren't.
You're now going to reply with "I already told you they are installed"... they aren't. They aren't installed/configured correctly. Good luck!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.