LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Web Server: Index Of (https://www.linuxquestions.org/questions/linux-server-73/web-server-index-of-4175544305/)

donaldfarkas 06-02-2015 06:20 PM

Web Server: Index Of
 
I'm have a Ubuntu webserver which I have installed xcart website in /var/www/html/xcart/

When I go to my domain for example "www.example.ca" I get an Index of
http://i.imgur.com/FEihr4i.png

If i click on the xcart link the website loads perfectly.

How do i fix it so when i go to "www.example.ca" it automatically loads xcart instead of showing Index Of?

Thanks in advanced guys!!!

mralk3 06-02-2015 06:52 PM

Web Server: Index Of
 
You need to edit the Web Server configuration so that the document root coincides with the location of your files.

Assuming you are using Apache, here is the documentation for doing so on Ubuntu:

https://help.ubuntu.com/lts/serverguide/httpd.html

The following will also be helpful :

https://www.digitalocean.com/community/tutorials/how-to-configure-the-apache-web-server-on-an-ubuntu-or-debian-vps

donaldfarkas 06-02-2015 06:54 PM

I am using apache I will take a look at the links you have provided and I will get back on here if I have any further questions.

mralk3 06-02-2015 07:27 PM

Quote:

Originally Posted by donaldfarkas (Post 5371233)
I am using apache I will take a look at the links you have provided and I will get back on here if I have any further questions.

If xcart is the only web application you are running, you could also move everything to /var/www instead of where you have the files copied to.

Doug G 06-02-2015 09:43 PM

You can use .htaccess to hide the subdirectory url. http://stackoverflow.com/questions/2...after-redirect


All times are GMT -5. The time now is 05:54 PM.