Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I've just installed an Ubuntu Server and transferred my files from another server to this one. I've copied the files into:

/var/www/DIRECTORY

When i go to the explorer and put IPADDRESS/DIRECTORY the page loads perfectly.

Of course, i do not want to people access via a directory to my website so i've tried to change the DocumentRoot of my server. So i went to

/etc/apache2/sites-available/default

and added the directory after de /var/www

DocumentRoot /var/www/DIRECTORY

     <Directory /var/www/DIRECTORY>  
           Options Indexes FollowSymlinks Multiviews  
           AllowOverride None  
           Order allow, deny  
           allow from all  
      </Directory> 

after that, restart apache

sudo /etc/init.d/apache2 restart

now, when i go to the explorer i type IPADDRESS

And it automatically redirects me to IPADDRESS/DIRECTORY

And gives me a 404 error

Not Found
Apache/2.2.14 (Ubuntu) Server at I.P.ADD. Port 80
The requested URL /DIRECTORY/ was not found on this server.

Does anyone know what could be the problem?

share|improve this question
    
Do you have an index file in that directory. Create simple index.html file in there and see if it loads. –  dan08 Aug 9 '13 at 14:45
    
i have the whole site in that directory.. anyway just in case i just made an index.html and still the problem persists. –  Esteban Aug 9 '13 at 15:29
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.