Not working DirectoryIndex
Submitted by djanym on Thu, 12/17/2009 - 04:05
Problem with mod_dir. It was working fine, but,, I don't know why now mod_dir is not working.
There is in apache.conf: Include /etc/apache2/mods-enabled/*.conf
There is in mods-enabled/dir.conf:
DirectoryIndex index.php index.php4 index.php3 index.cgi index.pl index.html index.htm index.shtml index.phtml
But when I'm trying to open site root it's only showing me the list of files. And there is index.html, but it does not open it automatically... Strange error...
I was trying to add DirectoryIndex directly in apache.conf - no success...
And I have restarted the server.
Forums:
ehcpdeveloper
Thu, 12/17/2009 - 09:51
Permalink
apply debug to your ehcp as
apply debug to your ehcp as described here: http://ehcp.net/?q=node/771
especially, try emptying your apache config.
maybe, you have more than one directoryindex statement in somewhere in your apache config, including custom http configs which you define inside ehcp.
make sure you did empty all custom apache configs..
what is apachehcp.conf file in your ehcp dir ?
djanym
Thu, 12/17/2009 - 23:45
Permalink
I don't have any custom
I don't have any custom config. Only standard configs.
This is my apachehcp.conf:
#____________start of mydomainxxx__paneluser:mydomain_reseller:admin_id:72____________
# explanation {aciklama}
ServerName mydomainxxx
ServerAlias www.mydomainxxx
# buraya aliaslar yazilacak..
UseCanonicalName Off
DocumentRoot /var/www/vhosts/mydomain/mydomainxxx/httpdocs
# this combined log format is understandable by webalizer... some other formats are not recognised by webalizer.. thats why, specified here explicitly..
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%v:%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
CustomLog /var/www/vhosts/mydomain/mydomainxxx/logs/access_log combined
CustomLog /var/log/apache_common_access_log vhost_combined
php_admin_value open_basedir /var/www/vhosts/mydomain/mydomainxxx
php_admin_value upload_tmp_dir /var/www/vhosts/mydomain/mydomainxxx/phptmpdir
php_admin_value session.save_path /var/www/vhosts/mydomain/mydomainxxx/phptmpdir
AccessFileName .htaccess
ServerName webmail.mydomainxxx
ServerAlias mail.mydomainxxx
ServerAlias email.mydomainxxx
DocumentRoot /var/www/vhosts/ehcp/webmail
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%v:%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
CustomLog /var/www/vhosts/mydomain/mydomainxxx/logs/access_log combined
CustomLog /var/log/apache_common_access_log vhost_combined
php_admin_value open_basedir /var/www/vhosts/ehcp/webmail
php_admin_value upload_tmp_dir /var/www/vhosts/ehcp/webmail/data
php_admin_value session.save_path /var/www/vhosts/ehcp/webmail/data
ServerName cpanel.mydomainxxx
ServerAlias panel.mydomainxxx
ServerAlias ehcp.mydomainxxx
ServerAlias cp.mydomainxxx
DocumentRoot /var/www/vhosts/ehcp/
LogFormat "%v:%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
CustomLog /var/log/apache_common_access_log vhost_combined
php_admin_value open_basedir /var/www/vhosts/ehcp/
#____________end of mydomainxxx__paneluser:mydomain_reseller:admin_id:72____________
#____________start of mydomainxxx2__paneluser:admin_reseller:admin_id:73____________
# explanation {aciklama}
ServerName mydomainxxx2
ServerAlias www.mydomainxxx2
# buraya aliaslar yazilacak..
UseCanonicalName Off
DocumentRoot /var/www/vhosts/myuser/mydomainxxx2/httpdocs
# this combined log format is understandable by webalizer... some other formats are not recognised by webalizer.. thats why, specified here explicitly..
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%v:%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
CustomLog /var/www/vhosts/myuser/mydomainxxx2/logs/access_log combined
CustomLog /var/log/apache_common_access_log vhost_combined
php_admin_value open_basedir /var/www/vhosts/myuser/mydomainxxx2
php_admin_value upload_tmp_dir /var/www/vhosts/myuser/mydomainxxx2/phptmpdir
php_admin_value session.save_path /var/www/vhosts/myuser/mydomainxxx2/phptmpdir
AccessFileName .htaccess
ServerName webmail.mydomainxxx2
ServerAlias mail.mydomainxxx2
ServerAlias email.mydomainxxx2
DocumentRoot /var/www/vhosts/ehcp/webmail
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%v:%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
CustomLog /var/www/vhosts/myuser/mydomainxxx2/logs/access_log combined
CustomLog /var/log/apache_common_access_log vhost_combined
php_admin_value open_basedir /var/www/vhosts/ehcp/webmail
php_admin_value upload_tmp_dir /var/www/vhosts/ehcp/webmail/data
php_admin_value session.save_path /var/www/vhosts/ehcp/webmail/data
ServerName cpanel.mydomainxxx2
ServerAlias panel.mydomainxxx2
ServerAlias ehcp.mydomainxxx2
ServerAlias cp.mydomainxxx2
DocumentRoot /var/www/vhosts/ehcp/
LogFormat "%v:%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
CustomLog /var/log/apache_common_access_log vhost_combined
php_admin_value open_basedir /var/www/vhosts/ehcp/
#____________end of mydomainxxx2__paneluser:admin_reseller:admin_id:73____________
ehcpdeveloper
Fri, 12/18/2009 - 10:56
Permalink
i suggest one of: if you dont
i suggest one of:
your directoryindex shoul be like, index.php, index.html and so on.
djanym
Sun, 12/20/2009 - 10:31
Permalink
Assalamu alaikum. The problem
Assalamu alaikum.
The problem was with htaccess...
It was in in xxx.com domain. And there was:
DirectoryIndex aboutus.html
(because there is not index.html)
But this htaccess was working for subdomains too. That's why my sub.xxx.com was not working.
I think that it will be better (in future versions) to move subdomains to main directory. So, for example: xxx.com, sub1.xxx.com, sub2.xxx.com, yyy.com - all of them will be in one dir.