2

My apache document root locate in /var/www and i created a directory called testwp on /var/www. I changed some privileges

  • sudo chown -R $USER:$USER /var/www/testwp

  • sudo chmod 755 /var/www/testwp

but i cant access that directory from my web browser http://localhost/testwp and it says

404 Not Found The requested URL /testwp was not found on this server.

How can i access like that?

can i do that? please help me. thanks

2

In sites-available/your-site what have you set for DocumentRoot?

Make it point to /var/www

ServerAdmin webmaster@localhost

    DocumentRoot /var/www
    <Directory />
            Options FollowSymLinks
            AllowOverride None
    </Directory>
    <Directory /var/www/>
            Options Indexes FollowSymLinks MultiViews
            AllowOverride None
            Order allow,deny
            allow from all
    </Directory> . . .
  • DocumentRoot /var/www/testwp but it didn't work. – sameermw Jul 2 '14 at 6:34
  • That's why it is not working. Change it to /var/www. Currently http://localhost/testwp refers to /var/www/testwp/testwp and http://localhost refers to /var/www/testwp – Ramanan R Jul 2 '14 at 6:42
  • OMG Thank you so much for the help, it works well – sameermw Jul 2 '14 at 7:10

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.