Questions tagged [apache2]

The Apache HTTPd Server. When asking questions about virtualhosts, please include the output of the following command: "apache2ctl -S" (or "httpd -S" depending on your OS)

The Apache HTTP Server is a popular Open Source Web server. This tag should be used for general questions about Apache HTTPd.

Although there is large degree of commonality between the different versions in the 2.x branches, please consider using the Apache-2.2 or Apache-2.4 tags instead for more specific Apache HTTP Server related questions.

Documentation for all major versions is both comprehensive and has a high degree of accuracy.


1741 questions
4
votes
2 answers

Apache2 mod_substitute not working in

I have a working Reverse Proxy that is active only on a specific Location in my site, in this case for example: www.example.com/reverseproxy/site1 I am reverse proxying site1. I want to replace some part of the body of every page that is proxied so…
3
votes
0 answers

Apache/PHP: Internal server error. Untraceable! How is that even possible?

I have a Nextcloud server running NextCloudPi (NCP) on a Raspberry Pi 3. NCP is Raspbian/Apache2/PHP/MariaDB stack so to speak. It's run reliably for years. But recently my Nextcloud died! All it does on a page load is report: Internal Server…
Bernd Wechner
  • 161
  • 1
  • 9
3
votes
1 answer

How can I disable TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 cipher in Apache2?

In SSL labs, I got that I'm using this "weak cipher": TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 Now in Apache, this is the set of suites I have enabled: SSLCipherSuite…
The Quantum Physicist
  • 658
  • 2
  • 11
  • 26
3
votes
1 answer

Lightsail instance requests time out with domain name but work with IP address

I'm attempting to create a BookStack site on an Amazon Lightsail instance. I'm having an issue where my static public IP address attached to my Lightsail instance will go to my site just fine, from any browser or computer. However, my domain address…
3
votes
1 answer

How to retain domain name in url - Configuring Virtual host in apache 2 with aws linux instance

I'm trying to configure virtual host in apache2 in ubuntu instance hosted with aws and successfully redirected the requests to the appropriate website. Further clicking on the links on the index page changes the url in the browser to…
Vivek
  • 93
  • 8
3
votes
1 answer

RewriteCond: check is %{HTTP_REFERER} include or equals %{REQUEST_URI}

Is there a way to check using RewriteCond whether the Referer includes the requested URI or... RewriteCond %{HTTP_REFERER} == 'host.com/' + %{REQUEST_URI} ... ? I need to catch whether the surfer clicked a link on the page which links to the same…
slava
  • 161
  • 2
  • 11
3
votes
2 answers

Google Cloud Compute Instance

I am hosting a website with apache on Google Cloud Platform and I wasn't sure if I should enable the ufw. Does google have a firewall already enabled on their Google Cloud Compute Instances? Thanks!
3
votes
1 answer

Apache Start Fails due to missing mpm module

I originally posted this question on StackOverflow. Before it was taken down as off topic, the answer and comments were leading to MPM not being loaded I tried sudo apt-get install apache-mpm-prefork but was given the error: E: Unable to locate…
joshy.poo
  • 143
  • 1
  • 5
3
votes
1 answer

Block access to all php files in subdirectory

I need to block access to all .php files in a subdirectory of my web root. I know that I could create a .htaccess in this subdirectory and use the following: Order allow,deny Deny from…
Phill Healey
  • 265
  • 3
  • 15
3
votes
1 answer

Same .htaccess on 2 servers, only working on one

Scenario I am working with two servers both running apache. An identical .htaccess is working on one server and not the other. Code AuthUserFile .htpasswd AuthType Basic AuthName "Password Required" Require user jackson Order Deny,Allow Deny from…
Jacksonkr
  • 465
  • 1
  • 7
  • 16
3
votes
1 answer

How to silence useless Apache mod_rewrite log messages?

I have some mod_rewrite rules to redirect junk requests made by bots to a static 404 page, like: RewriteRule ^(.*)\.asp(.*)$ https://%{SERVER_NAME}/errors/404.html [L,R=301,NC] I have a few dozen of these rules. However, upon inspecting my Apache…
Cerin
  • 3,600
  • 19
  • 61
  • 79
3
votes
2 answers

Apache ProxyPass to Tomcat - how to remove context path from URL?

I have Apache conf: ServerName project.example.com ServerAlias ci ProxyRequests Off Order deny,allow Allow from all ProxyPreserveHost on …
Justas
  • 221
  • 1
  • 6
  • 12
3
votes
1 answer

Apache htaccess redirect?

I have a client who has a domain like this-site.com and also thissite.com Without going into the entire issue behind it, we need to redirect any incoming request to any *.this-site.com to the matching *.thissite.com. So for…
3
votes
1 answer

Complicated mod-rewrite

I have a requirement from a customer to perform some specific redirects (part of decomissioning an old server to a new one). I've been banging my head against this and it's driving me nuts! In effect, I need to do two .htaccess mod-rewrites at the…
3
votes
1 answer

Apache cannot access mod_security log

I have an Apache2 server that cannot access the mod-security log: prim@x.x.x.x:~$ apachectl -V AH00526: Syntax error on line 196 of /etc/modsecurity/modsecurity.conf: ModSecurity: Failed to open the audit log file:…
caliph
  • 213
  • 1
  • 4
  • 8