Page 1 of 1

update the file access sequence on webserver

Posted: Thu Jan 26, 2017 12:44 pm
by shyboy
Currently webserver looks for index.htm then index.php etc.

How do I change that and check first index.cfm page on the webserver?

Re: update the file access sequence on webserver

Posted: Thu Jan 26, 2017 2:08 pm
by ScIT
please share your os version.

Re: update the file access sequence on webserver

Posted: Thu Jan 26, 2017 4:08 pm
by shyboy
core package Version:0.9.8 (amd64)
Ubuntu 14.04 x64

Re: update the file access sequence on webserver

Posted: Fri Jan 27, 2017 7:09 am
by ScIT
Seems like DirectoryIndex is what you search: https://httpd.apache.org/docs/current/mod/mod_dir.html

Re: update the file access sequence on webserver

Posted: Fri Jan 27, 2017 10:54 am
by shyboy
Yes, exactly this is what I need to update.
My question was which file I need to modify so it would effect all the websites and it should keep the same way if I create a new website.

TIA

Re: update the file access sequence on webserver

Posted: Fri Jan 27, 2017 11:01 am
by shyboy
to be more specific on my question.
if I modify /etc/apache2/mods-enable/dir.conf

The new entries would be kept for all newly created websites?

Thanks

Re: update the file access sequence on webserver

Posted: Fri Jan 27, 2017 1:34 pm
by shyboy
my current directoryIndex looks like
DirectoryIndex index.html

if I change this to
DirectoryIndex index.cfm index.html

What it should do is to look for index.cfm file and if can't find then look for index.html.

What its currently doing is looking for index.cfm and then generate the missing 404 error for index.cfm

Re: update the file access sequence on webserver

Posted: Fri Jan 27, 2017 1:52 pm
by mehargags
just edit your virtual host in
/home/<user>/conf/web/apache2.conf

Re: update the file access sequence on webserver

Posted: Fri Jan 27, 2017 2:14 pm
by ScIT
mehargags wrote:just edit your virtual host in
/home/<user>/conf/web/apache2.conf
But please take care: Everytime you change your web settings or rebuild your user, it will be overwriten from VestaCP. If you want to have a persistent solution, create your own template in /usr/local/vesta/data/templates/web