Re: [us...@httpd] mod_rewrite/rewriterule - forcing a HTTP 500 code on all access attempt?
Frank Z wrote: is there a way via RewriteRule to force all access to a certain URL to return with a HTTP 500 e.g. i have a number 3 applications that are or will be obsoleted and is expected to return a 500 to all callers who try to access it. so when someone tries to access a deprecated URL such as http://myserver/myApp1 I would like to send back a 500 and preferably some textual information (nice to have). Will it be possible to do this via mod_rewrite? It is certainly possible with mod_rewrite, but why don't you just create a little cgi script which returns whatever you want ? Or just set an Alias ? Alias /my/former/page "/var/www/docs/special/my-error-page.html" Otherwise, a 500 is a "server error", which is probably not appropriate here. You should look for a more appropriate error code, maybe in the 300 series ? See RFC 2616. According to the HTTP specs, not all error codes admit a response body. Also a tip : if you return an error page, make sure it is larger than 1024 bytes or so, otherwise Internet Explorer will substitute it with a "friendly error page" which doesn't say anything helpful. - The official User-To-User support forum of the Apache HTTP Server Project. See http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org " from the digest: users-digest-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
[us...@httpd] Apache 2.2
Just migrated to apache-2.2.13 and already ran into this problem: myserver# apachectl fullstatus Forbidden - You don't have permission to access /server-status on this server. Even getting the same error when logged on as 'root' Can you tell me what is causing this? Thanks. Jos - The official User-To-User support forum of the Apache HTTP Server Project. See http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org " from the digest: users-digest-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [us...@httpd] Apache 2.2
On Dec 5, 2009, at 08:18 , Jos Chrispijn wrote: Just migrated to apache-2.2.13 and already ran into this problem: myserver# apachectl fullstatus Forbidden - You don't have permission to access /server-status on this server. Even getting the same error when logged on as 'root' Can you tell me what is causing this? Thanks. Being logged on as root makes no difference, because this is a HTTP request to the server. What does the error log say? You're probably lacking an "allow from" directive somewhere. See: http://wiki.apache.org/httpd/ClientDeniedByServerConfiguration and -- Rich Bowen rbo...@rcbowen.com - The official User-To-User support forum of the Apache HTTP Server Project. See http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org " from the digest: users-digest-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [us...@httpd] Apache 2.2
Just migrated to apache-2.2.13 and already ran into this problem: myserver# apachectl fullstatus Forbidden - You don't have permission to access /server-status on this server. Even getting the same error when logged on as 'root' Can you tell me what is causing this? Thanks. Jos Check the mod-info.conf file to see if you have localhost in the allowed field. - The official User-To-User support forum of the Apache HTTP Server Project. See http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org " from the digest: users-digest-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [us...@httpd] Apache 2.2
Rich Bowen wrote: Being logged on as root makes no difference, because this is a HTTP request to the server. What does the error log say? You're probably lacking an "allow from" directive somewhere. See: http://wiki.apache.org/httpd/ClientDeniedByServerConfiguration and Just found out (reading some stuff about directives) that in the standard httpd.conf file there is a section: # First, we configure the "default" to be a very restrictive set of features. # AllowOverride None Order deny,allow Deny from all which I hashed out immediately to see what would happen. After that, I browsed to one of my sites and got response, but only .php code contents. So I knew I was on the right way. Then I noticed that in my httpd.conf there was a line saying: *LoadModule php5_module libexec/apache22/libphp5.so * but there wasn't a accompanied AddType application directive! So I added in the an extra line, saying *AddType application/x-httpd-php .php* After restarting Apache22, it all works again without problems. And even faster than it did before! I am quite pleased to see that the httpd.conf is considerably shorter than the Apache1.3x was. Mine is so compact now that you nearly wouldn't believe it would work. So overall experience for an Apache nub like me: if you can, do use it. Will make your life much easier when it runs finally :-) Thanks, Jos Chrispijn
[us...@httpd] href="frag.php&field=value" gets error 404.
Hi, I am using an html file to run a php script thus... Frag Frag Input The first link works file but the second produces a 404 error; correctly so as the php file being invoked is /var/www/frag.php&input=xxx according to the error log. Could anyone point me to a web page that explains what I need to do here? Thank you for your attention. Brian Hooper _ Use Hotmail to send and receive mail from your different email accounts http://clk.atdmt.com/UKM/go/186394592/direct/01/
Re: [us...@httpd] href="frag.php&field=value" gets error 404.
rag.php?field=value ? rather than & - The official User-To-User support forum of the Apache HTTP Server Project. See http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org " from the digest: users-digest-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
[us...@httpd] Using Virtual hosts for all the websites in one instance of Apache
Hi, we have hundreds of websites and each website has multiple sub domains. All the sites are running under sun web server 7.0 For example, www.hosting.com is the main domain, it also has sub domain as www.hasting.com. www.hasting.com will be redirected back to www.hosting.com. sometimes, if the domain name is www.hostingforyou.com then it is redirected to a deep link of www.hosting.com like www.hosting.com/docs/newdomain.html or else some external link. All these redirections should be 301 and also non to www. These domain names have been setup at the DNS level. Instead of adding virtual host for hasting.com in sun web server. Our company wants to add all these subdomains of all websites in one instance of apache web server. Is it possible to do? - Thanks, Charan - The official User-To-User support forum of the Apache HTTP Server Project. See http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org " from the digest: users-digest-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [us...@httpd] Using Virtual hosts for all the websites in one instance of Apache
Charan wrote: Hi, we have hundreds of websites and each website has multiple sub domains. All the sites are running under sun web server 7.0 For example, www.hosting.com is the main domain, it also has sub domain as www.hasting.com. www.hasting.com will be redirected back to www.hosting.com. sometimes, if the domain name is www.hostingforyou.com then it is redirected to a deep link of www.hosting.com like www.hosting.com/docs/newdomain.html or else some external link. All these redirections should be 301 and also non to www. These domain names have been setup at the DNS level. Instead of adding virtual host for hasting.com in sun web server. Our company wants to add all these subdomains of all websites in one instance of apache web server. Is it possible to do? - Probably, but it would help if you stopped using words like "subdomain" in a context that does not seem to make sense. In no way is for example www.hasting.com a subdomain of www.hosting.com, and talking of subdomains of a website makes no sense at all. You may want to have a look at the on-line Apache documentation, and particularly at directives such as ServerName and ServerAlias, and at the virtual host documentation at http://httpd.apache.org/docs/2.2/vhosts/ and also maybe at mod_rewrite : http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html - The official User-To-User support forum of the Apache HTTP Server Project. See http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org " from the digest: users-digest-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
[us...@httpd] Re: href="frag.php&field=value" gets error 404.
On Dec 5, 2009, at 10:18, Brian Hooper wrote: Frag Input & is used to separate values from each other. ? Is used to seperate the values from the URL.