apache-config

Removal of the /var/www/icons alias from Apache config [closed]

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-08 17:40:30
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 7 years ago . I have a directory called /var/www/icons on my web server, which is also referenced as an alias in my Apache config as seen below: Alias /icons/ "/var/www/icons/" The directory contains a number of small PNGs and GIFs, which AFAIK are unused, along with a README file. Am I safe to remove this alias from my

Necessary to set ServerSignature and ServerTokens apache config options with Rails apps?

五迷三道 提交于 2019-12-07 08:50:54
问题 I came across something in one of my rails books that said I should set ServerSignature Off ServerTokens Prod to disable apache from showing server information in production when the app screws up. Is this necessary? The only error message I see in prod is the standard Rails production error message. I never see any server information. Are there any other security related apache config variables I need to set? 回答1: It is not necessary, but it is recommended. By showing the server signature

Completely hide server name apache

不想你离开。 提交于 2019-12-06 04:40:45
问题 I have added these 2 lines in my etc/apache2.conf file, and it hid the OS and apache version. ServerSignature Off ServerTokens Prod But after all I can see the header with server name Server Apache How to hide this information as well ? I am using Debian 7, apache v 2.2 Thanks 回答1: Apache on its own cannot completely unset the Server header (not even with mod_headers). This appears to be by design, as discussed by the Apache devs. There is a way to do this using ModSecurity, but I know little

Necessary to set ServerSignature and ServerTokens apache config options with Rails apps?

六月ゝ 毕业季﹏ 提交于 2019-12-05 13:25:56
I came across something in one of my rails books that said I should set ServerSignature Off ServerTokens Prod to disable apache from showing server information in production when the app screws up. Is this necessary? The only error message I see in prod is the standard Rails production error message. I never see any server information. Are there any other security related apache config variables I need to set? It is not necessary, but it is recommended. By showing the server signature and the full server tokens you are giving potential hackers an easier way to identify how to hack your system.

.htaccess : Location not allowed here

寵の児 提交于 2019-12-05 12:30:55
问题 I am getting a "Location not allowed here" error with this .htaccess . Does anyone have any idea on how I should fix this? <Files 'login'> AuthName NTLM AuthType NTLM NTLMAuth on NTLMAuthoritative on NTLMServer <censored> NTLMBackup <censored> NTLMLockfile <censored> require valid-user Satisfy all </Files> <Location /alarms/[0-9]+/acknowlege> Order deny,allow Deny from all Allow from localhost </Location> 回答1: Location isn't valid in .htaccess See: http://httpd.apache.org/docs/2.2/mod/core

Get a 404 Error when clone, pull mercurial repository

北慕城南 提交于 2019-12-05 11:16:21
I have a repository in here http://repos.joomlaguruteam.com/ I using hgweb.cgi this is my hgweb.config file [web] baseurl = #allowpull = true allow_push = * push_ssl = false allow_archive = bz2 gz zip [paths] / = /home/repos/* I can browse it but I can't clone it. Every time I clone it I have this error hg clone http://repos.joomlaguruteam.com/hello destination directory: hello requesting all changes abort: HTTP Error 404: Not Found and the access log have that 115.5.95.59 - - [10/Feb/2011:04:20:33 -0600] "GET /hello?pairs=0000000000000000000000000000000000000000

Apache ErrorDocument with absolute path

佐手、 提交于 2019-12-05 10:39:34
I have a server with several virtual hosts. Now I want to set up the error documents for the whole server. I have located my error sites in /var/www/error/*, but with the ErrorDocument Directive I am only able to set the error document relative to document root, but I want to use the absolute path (e.g /var/www/error/404.html). Has anyone an idea how I can get this? I don't think this can be done directly inside the statement: The ErrorDocument will always have to be relative to the DocumentRoot . According to the docs , the only alternative seems to be specifying an external URL, but that is

Completely hide server name apache

浪子不回头ぞ 提交于 2019-12-04 10:25:54
I have added these 2 lines in my etc/apache2.conf file, and it hid the OS and apache version. ServerSignature Off ServerTokens Prod But after all I can see the header with server name Server Apache How to hide this information as well ? I am using Debian 7, apache v 2.2 Thanks Ramón Apache on its own cannot completely unset the Server header (not even with mod_headers). This appears to be by design , as discussed by the Apache devs. There is a way to do this using ModSecurity, but I know little about that. Instead, these people have it all figured out already: https://unix.stackexchange.com

Restart httpd after changes in the httpd.conf

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-04 08:13:06
问题 Do I need to restart httpd after changes in the httpd.conf file for changes to take effect? 回答1: Yes. HTTPD.conf is read on apache start-up, so for any changes to take affect you need to restart it. 回答2: Yes you need to restart the server by sudo service httpd restart You can check errors in your config files by apachectl -t Changes may take some time to reflect. 回答3: You can have apache re-read its config files without restarting by sudo apachectl graceful (or apache2ctl on debian). From the

Apache .htaccess <Directory not allowed here

我们两清 提交于 2019-12-04 03:50:09
问题 I run XAMPP and I'm trying to learn how .htaccess works. I have a file structure that looks something like this: /parent /foo /bar .htaccess I simply want to change all foo requests to bar with a GET parameter appended after them. For example: foo/ foo/hello.php turn into: bar/?test=yes bar/hello.php?test=yes When I try to put the <Directory> directive in my .htaccess file: <Directory "/foo"> Options +Indexes </Directory> I get the following error log: [Tue Sep 19 17:23:58.356362 2017] [core