Questions tagged [httpd.conf]

The main configuration file of Apache HTTP Server is usually called httpd.conf

The main configuration file of Apache HTTP Server is usually called httpd.conf. The location of this file is set at compile-time but may be overridden with the -f command line flag.

2031 questions
0
votes
1 answer

apply rewrite for specific request url pattern

I used the following rule to check if the png exists. RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(?!.+/default\.png$).+\.png$ /web/team/default.png [L,NC,R=301] If it does not it will…
Jecki
  • 802
  • 3
  • 16
  • 32
0
votes
0 answers

Apache - virtual host is not going to the correct directory?

When i do httpd -S i can see the Syntax OK port 443 namevhost xyz.example.com alias xyz.example.com But when i visit to https://xyz.example.com/ajax/query it goes to wrong directory instead of defined directory. EDIT:
user285594
0
votes
1 answer

X-Frame options sameorigin issue

I need to show a mautic form on my wordpress website. Hosting environment is AWS Lightsail. Form is showing properly but when click on submit button, it is not submitting and page keeps as it is. When i checked the developer console of Chrome…
CodeCanyon
  • 929
  • 2
  • 11
  • 36
0
votes
2 answers

Apache2: "Address already in use" when trying to start it ('httpd.pid' issue?)

Using Apache2 on Linux, I get this error message when trying to start it. $ sudo /usr/local/apache2/bin/apachectl start httpd not running, trying to start (98)Address already in use: make_sock: unable to listen for connections on address…
Hookstark
  • 1,097
  • 3
  • 11
  • 23
0
votes
1 answer

Apache X-FRAME OPTIONS

i'm tried to enable X-FRAME only my spasific VH on httpd-default.conf i set the line: Header always append X-Frame-Options SAMEORIGIN on my website that i need to enable X-FRAME from specific Source: Header always append X-Frame-Options "ALLOW-FROM…
0
votes
2 answers

Docker Compose setting Hostname

I have the basic docker-compose.yml shown below for an apache server. And I was wondering if there was a way to configure this apache server, which is currently accessible using 0.0.0.0:8889 OR localhost:8889, so is it accessible using a custom host…
AnchovyLegend
  • 12,139
  • 38
  • 147
  • 231
0
votes
1 answer

Not Able to Set HeaderRequest with httpd on Amazon Linux behind Load Balancer

We have a configuration where we front the server with EC2 Load Balancer. Because of that, it seems that the "Host" is not properly set when it reaches the server. Because of that we are trying to set the value using the proxy, but it doesn't seem…
juminoz
  • 3,168
  • 7
  • 35
  • 52
0
votes
0 answers

what is the priority of httpd conf and htaccess files rewrite directives

i need to set most of my rewrite directive inside http.conf, and only keep a redirect directive inside my htaccess in case the website was offline, because that is variable and i dont want to have to restart wamp in case the http file got…
ZeSoft
  • 305
  • 2
  • 4
  • 13
0
votes
1 answer

Prevent cgi/perl scripts to be executed

Last week a server was hacked by uploading a perl script. An uploaded .htaccess made it possible to run that perl-script (AddHandler cgi-script and Options +ExecCGI). Is there a solution that +ExecCGI cannot be set through .htaccess? Options and…
Thenob
  • 36
  • 1
0
votes
3 answers

Switching between Htdoc Webroots - Change my "DocumentRoot" variable in "httpd.conf" or use Symbolic Links?

I've officially reached the end of my wits on this problem. As someone who constantly works on several websites at a time (I'm sure I'm not alone here), it becomes frustrating renaming my "htdocs" directory whenever I want to work on a different…
CauselessEffect
  • 415
  • 5
  • 11
0
votes
1 answer

apache mod_proxy url does not work unless / is appended

I have apache 2.4 setup with mod_proxy to load balance 2 tomcats. Here is the addition to httpd.conf ProxyRequests Off ProxyPass /APP balancer://mycluster stickysession=JSESSIONID|jsessionid ProxyPassReverse /APP balancer://mycluster
user811433
  • 3,999
  • 13
  • 53
  • 76
0
votes
1 answer

Apache Can't Start again after restart

I'm confused because of this error. Any help will be appreciated
0
votes
0 answers

How to modify and customize error log for apache in linux

I try to modify the error log to show runtime duration. I added %T/%D at the end of the LogFormat at httpd.conf like this: LogFormat "%{Referer}i -> %U" referer LogFormat "%{User-agent}i" agent # NOTE: "combined"…
matisa
  • 497
  • 3
  • 25
0
votes
1 answer

URL redirect via apache

I have gone through a lot of tutorials on apache,and could redirect few urls. Though,there is this url for which I need to do a redirect and I couldn't.Any help would be much appreciated! Thanks ! Note: Making changes to httpd.conf URL :…
0
votes
1 answer

Requests timeout definition using RequestReadTimeout param doesn't take effect in Apache httpd.conf

I am using Apache HTTPD 2.4 in my web application along with it's httpd.conf file which ensures desired requests handling. I have already defined some proxy rules to redirect reqests into proper backend endpoints and everything works fine excepts…
Macieyo
  • 440
  • 6
  • 15