2

I am using Ubuntu machine. I am running lampp server for php files.

I have all my PHP files in my_folder where I have all my codes in /opt/lampp/htdocs/my_folder including index file in /opt/lampp/htdocs/my_folder/index.php.

I wanted to check my codes by running http://localhost/index.php in Chrome browser, but for some reason it keeps directing me to /var/www/html/html.index file. Can someone please help me resolve this problem?

Thanks in advance.

2 Answers 2

3

add this to you apache config.

DocumentRoot /opt/lampp/htdocs/my_folder
<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>
<Directory /opt/lampp/htdocs/my_folder>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    allow from all
</Directory>
Sign up to request clarification or add additional context in comments.

3 Comments

Thanks, it now redirects to the desired path only generating the actual code in the browser. It doesn't execute the codes. What could be the reason?
Check you php by put the info.php in your rootpath, then access it.
Thanks. This was the issue and the answer here fixed it: stackoverflow.com/questions/19533439/…
0

Adittionally, If MySQL doesn't start:

sudo /etc/init.d/apache2 stop
sudo /etc/init.d/mysql stop
sudo /etc/init.d/proftpd stop
sudo /opt/lampp/lampp start

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.