Hi, I need to set up some configuration for an url, using the <Location> directive. I add the directives in the "Add directive" box in the admin panel, but in the Vhosts_ispconfig.conf I find them commented out as not supported. Here the relevant section stripped of personal data: ###################################### # Vhost: www.myhost.com:80 ###################################### # # <VirtualHost xxx.xxx.xxx.xxx:80> # <Location /my/location> # NOT SUPPORTED! # DirectoryIndex index.php index.html index.htm # NOT SUPPORTED! # Options +Indexes # NOT SUPPORTED! # IndexOptions FancyIndexing IconsAreLinks SuppressHTMLPreamble NameWidth=* # NOT SUPPORTED! # IndexIgnore HEADER* banner.gif favicon.ico # NOT SUPPORTED! # AddIcon favicon.ico *myfile*.zip # NOT SUPPORTED! # AllowOverride None # </Location> ServerName www.myhost.com:80 ServerAdmin [email protected] DocumentRoot /var/www/web11/web ServerAlias myhost.com DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml index.cgi index.pl index.jsp Default.htm default.htm ScriptAlias /cgi-bin/ /var/www/web11/cgi-bin/ AddHandler cgi-script .cgi AddHandler cgi-script .pl ErrorLog /var/www/web11/log/error.log AddType text/html .shtml AddOutputFilter INCLUDES .shtml AddType application/vnd.wap.wmlscriptc .wmlsc .wsc AddType text/vnd.wap.wml .wml AddType text/vnd.wap.wmlscript .ws .wmlscript AddType image/vnd.wap.wbmp .wbmp Alias /error/ "/var/www/web11/web/error/" ErrorDocument 400 /error/invalidSyntax.html ErrorDocument 401 /error/authorizationRequired.html ErrorDocument 403 /error/forbidden.html ErrorDocument 404 /error/fileNotFound.html ErrorDocument 405 /error/methodNotAllowed.html ErrorDocument 500 /error/internalServerError.html ErrorDocument 503 /error/overloaded.html AliasMatch ^/~([^/]+)(/(.*))? /var/www/web11/user/$1/web/$3 AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web11/user/$1/web/$3 </VirtualHost> Well, if I remove the # and restart apache...simply the <location> directive works perfectly but at the next change in the admin panel, all the <location> directive gets commented. If it works, it is supported. And on another server I used this block of instructions for years without any problems. I know I can move all to apache.con file, but I would like to keep everything in the vhost file. Thanks
What's the output of Code: httpd -t when you remove the comments from Code: # <Location /my/location> # NOT SUPPORTED! # DirectoryIndex index.php index.html index.htm # NOT SUPPORTED! # Options +Indexes # NOT SUPPORTED! # IndexOptions FancyIndexing IconsAreLinks SuppressHTMLPreamble NameWidth=* # NOT SUPPORTED! # IndexIgnore HEADER* banner.gif favicon.ico # NOT SUPPORTED! # AddIcon favicon.ico *myfile*.zip # NOT SUPPORTED! # AllowOverride None # </Location> ?
Here it is: httpd -t Syntax OK But not only httpd -t gives me an ok, but If I go to the location, it behaves according to the instructions I gave in the <location> block. So, it works for sure on the system managed by ispconfig even though ispconfig comments.
Thats strange, as ISPConfig aclls httd -t to check the syntax. If you want to disable the syntay check, change the line: $go_info["server"]["httpd_check"] = 1; to: $go_info["server"]["httpd_check"] = 0; in the file /home/admispconfig/ispconfig/lib/config.inc.php
I have not such a line there: homeland:~# egrep -R httpd_check * grep: blog/wp-content/advanced-cache.php: No such file or directory ispconfig/scripts/writeconf.php:exec("ps ax | grep httpd | grep -v ispconfig | grep -v grep", $httpd_check, $ret_val1); ispconfig/scripts/writeconf.php:unset($httpd_check); homeland:~# and: homeland:/home/admispconfig# egrep -R httpd_check * homeland:/home/admispconfig# I never touched /home/admispconfig/ispconfig/lib/config.inc.php by hands
A question: does this happens just to me or someone else is able to cause the same behaviour adding a <location> directive?
Till made an error, this option doesn't exist in ISPConfig. However, you could change the function httpd_syntax_check() in /root/ispconfig/scripts/lib/config.lib.php.
I have this same problem. Has anyone found a good fix for this? I added a line in apache.conf Code: Include /etc/apache2/vhosts/Vhosts_myaddons.conf and then in the Vhost_myaddons.conf I added Code: <VirtualHost 192.168.1.2:80> <Location /mylocation> #options for mylocation </Location> <LocationMatch '/[^/]+/login'> #options for authentication </LocationMatch> ServerName subdomain.domain.tld:80 </VirtualHost> It works, but it would be kinda nice to have it editable in the ISPConfig Control Panel. Just wondering, Thanks, Dan