Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [apache-2.4]

Version 2.4 of 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)

0
votes
0answers
19 views

High CPU Usage on Ubuntu 18.04 Apache [on hold]

Screenshot of HTOP My server's CPU Usage immediately spike up every time the server is up. What could be the cause of this problem? This question is set on hold because it's too board. May I know ...
0
votes
0answers
13 views

Why are Apache Rewrite Conditions not working?

I tried to perform a redirect writing in .htaccess file: RewriteEngine on RewriteRule article-1 www.another-site.com/article-1 [R=301,L,NC] and it works correctly. Anyway, when I add a rewrite ...
1
vote
0answers
12 views

RewriteMap dbm .dir .pag

I have been working with RewriteMap dbm, I was able to the text version working however cannot figure out how or why I am getting the error described below. The Virtual host: <VirtualHost *:80>...
1
vote
0answers
12 views

Trying to run php-fpm 5.6 alongside php7.2 for different Apache virtual hosts on EC2 amazon linux , what am I missing?

I'm working on amazon linux on an EC2 instance. I installed php72 using yum, apache worked fine. I have installed php5.6 at /opt/php5.6 configured it as fpm and done the make install whcih all went ...
1
vote
1answer
12 views

Apache and PHP-FPM security with mod_proxy_fcgi

I use PHP-FPM in a shared hosting configuration. Each FPM pool runs as a different user. Apache runs as www-data. Apache connects via a socket using mod_proxy_fcgi. I allow users to use .htaccess ...
0
votes
1answer
17 views

Is it a good idea to put shared files outside public_html / root?

I just figured out that I can place files outside the domain root (outside public_html). The benefit of placing functions outside the domain root is that I can use the same file on multiple domains. ...
0
votes
0answers
10 views

Setting Environment Variables using apache If and ElseIf statements

I'd like to log a unique tracking ID for each of our users in our apache 2.4 access logs. We have several products, which share the same web server, but aren't otherwise connected (different users, ...
0
votes
0answers
13 views

How do I contain apache forward proxy in docker [on hold]

I know how to configure that on ubuntu but not using Docker container as I am new to Docker. Do I need to use dockerfile or other easier methods and how? I guess pulling apache docker image as its ...
0
votes
2answers
25 views

Apache2 URL Rewrite with Reverse Proxy

I've been trying to accomplish a goal of using Apache as a reverse proxy to translate HTTP to HTTPS as well as using mod_rewrite to inject a query string. The reverse proxy works if tested without ...
-2
votes
1answer
17 views

Using htaccess change the website default index file from root folder to sub folder, site other pages should still work from root folder

Using htaccess how to change the PHP website default home page ie index.php file from root folder ie "html" to sub folder(say it 'subfolder') but site should still work as before ie the home page will ...
0
votes
0answers
7 views

More efficient sitemap to handle google crawling

My server running apache is getting slammed by googlebot. I have sitemap index which points to several sitemaps with 50000 entries each. Google is requesting the sitemaps so aggressively (several ...
0
votes
1answer
18 views

Redirect a subdomain to a different login page

I have a domain with a subdomain set up like the following in my vhost.conf file. <VirtualHost *:80> ServerName mysite.com ServerAlias www.mysite.com DocumentRoot /opt/mysite/...
0
votes
0answers
14 views

Apache SetEnvIf with Host AND Request_URI

I need to set different environment variables depending on Host and first part of the Request_URI like http://domain1.tld/de , http://domain2.tld/de, http://domain1.tld/en, http://domain2.tld/en ...
0
votes
0answers
6 views

EasyPHP: Unable to persist a change in httpd.conf [closed]

I am newbie in apache server setup/maintenance. I use easyphp to install apache/php/sql in my desktop. But when I change httpd.conf, the changes does not take effect. The saving is successful though. ...
0
votes
0answers
16 views

Apache 2.4 SSLSessionCache missed

Apache server is behind a physical loadbalancer et it uses an https connection between. The loadbalance break the https en create a new https connexion with apache. So it's always the same client ...
-2
votes
1answer
85 views

ScriptAlias: How to mark DocumentRoot to a target directory

I am hosting a git apache server, and I need to trigger a script with ScriptAlias. I was wondering if it was possible to to use ScriptAlias in this fashion, so it is triggered when there is a GET ...
1
vote
2answers
32 views

ModSecurity SecRule based on original browser url, not internal rewrite (index.php, app.php, etc.)

I'm working on a Symfony 2 site, and am trying to create a ModSecurity rule to match a particular browser URL. IE example.com/results Symfony 2 internally rewrites all requests to app.php using ...
0
votes
2answers
11 views

Including 2 CAs in VirtualHost in Apache using httpd for https phone/server handshake

Please bare with me, I'm new to configuring SSL. I'm trying to load a server cert from godaddy so have xxxxxxx.crt, and bundle.crt, I've made a key/csr which we used to create the certs. I'm now ...
-2
votes
0answers
30 views

accessing vhost location from a different system on a LAN

noob alert; Although the question already exists, but it does not entirely answer my question. Accessing a vhost on a LAN Machine A I've got an enabled vhost file that points to a directory: /some/...
0
votes
1answer
41 views

Apache queries mariadb database -> how to log queries?

I got a apache2 vhost-configuration with BasicAuth. With the AuthDBDUserPWQery directive I'm checking a mariadb in the background, if the user-pw-combination exists. For troubleshooting I want to see ...
-1
votes
0answers
10 views

when i am trying to deploy war in tomcat getting error in Firefox

The connection to the server was reset while the page was loading. The site could be temporarily unavailable or too busy. Try again in a few moments. If you are unable to load any pages, check your ...
1
vote
1answer
28 views

htaccess issues with non existent files in non existent directories

I am using the following .htaccess file, which works well, however, I want to also forward any attempts to access non-existent files in the root directory and in any subdirectory (whether the ...
0
votes
0answers
21 views

How to use different php version on ubuntu

I have a main webpage that uses php v5.6, now we're integrating a project into a subdomain that need php v7.1 /var/www/html/mainpage.com /var/www/html/subdomain.mainpage.com The server is a vps ...
0
votes
0answers
7 views

Stopping apache with running mod-mono-server application takes several minutes

I run a ASP.NET Application on a CentOS 7.5 Host via Apache and the mod-mono-server4 Basically the Application runs fine. But if it is required to stop apache it takes several minutes until apache is ...
0
votes
0answers
25 views

Apache server status scoreboard

I am trying to figure out why we are having relativly high load even during hours in the day where there is almost no traffic. I came across the server-status log, where I see that there are workers ...
0
votes
0answers
95 views

apache2.4 RewriteBase keeps redirecting to login page

Apache2.4 universal redirection to login page( is the default setting in nextcloud image that im using), this is preventing letsencrypt/certbot from accessing the path /var/www/html/data/.well-known/...
0
votes
0answers
13 views

WAMP Stack/Silverstripe, High TTFB but fast PHP execution? Where can I look for answers?

My production server is Windows Server 2012, Apache 2.4, PHP 5.6, and MariaDB (unsure of version, probably irrelevant). I have a customized site running on Silverstripe 3.5. Lately, I'm getting ...
0
votes
1answer
24 views

AWS Can't Set Headers via Apache

I am trying to send HTTP response headers from Apache on an Amazon Linux 2 AMI EC2 instance. I had originally tried to do this in httpd.conf and tried a few variations... httpd.conf Header always ...
0
votes
0answers
15 views

Virtual Host preventing server-status directive

In my Ubuntu 16.4 VM I've set up Apache 2.4 successfully and have several vhosts set up. I'm wanting to see server-status but my first vhost keeps preventing that. I've read and re-read the Apache 2.4 ...
-1
votes
0answers
13 views

how to change serverlimit value in apache 2.4

In apache 2.4 configurations are separated out into the conf.d files. The ServerLimit value is no longer in the httpd.conf I have read that it is now in the mpm_prefork.conf . I do not have this ...
0
votes
0answers
10 views

apache2 configuration if file exists [duplicate]

Can I configure apache2 to choose between to configuration depending if a file exists? I'm talking ssl for this particular situation but I'm interested in general. I always create a self signed ...
0
votes
0answers
22 views

Require local ip to access an Apache served site hosted externally

Attempting to configure Apache 2.4 access control: https://httpd.apache.org/docs/2.4/howto/access.html I have a site hosted on an external machine, serving from Apache 2.4. I need to restrict access ...
-1
votes
1answer
24 views

You don't have permission to access when to set two name-based web sites on a single IP address in apache [duplicate]

Apache was installed on my debian,i want to bind two domain name with different directroy. cat /etc/hosts 127.0.0.1 hwy.local www.hwy.local test.app www.test.app Two domain name all binded ...
-1
votes
1answer
36 views

Why can't I set two vhost in my apache?

Apache was installed on my debian,i want to bind two domain name with different directroy. cat /etc/hosts 127.0.0.1 hwy.local www.hwy.local 127.0.0.1 test.app www.test.app Two domain name ...
-1
votes
3answers
23 views

Why apache need authorization for url with username and password?

I build basic authorization in apache.Only one line in /var/www/html/remote.html. <p>it is a test </p> Now to verify the username and password with curl. curl -u xxxx:xxxx -v http://...
-1
votes
3answers
30 views

Apache Virtual Host redirect from https subdomain to subdirectory

How do I redirect requests coming to https://blog.example.com to https://example.com/blog? Reading the apache docs on when not to use the rewrite mod, I tried a simple redirect e.g. Redirect https://...
1
vote
1answer
17 views

Changing user Apache is running as on Windows

Our Apache installation is currently running as the default LocalSystem account on a windows server. We need to give Apache read and write access to a directory on a network share and as LocalSystem ...
0
votes
2answers
51 views

How to debug EC2 server that stop responding silently randomly

I'm running a t2.micro instance on Amazon Linux AMI 2018.03 (4.14.59-64.43.amzn1.x86_64). It hosts a php website using Apache/2.4.33, and connect to an RDS MySQL database. From time to time, the ...
0
votes
0answers
39 views

How to create a dynamic Reverse Proxy that points to X number of domains?

I'm fairly new to server configuration, here is my case: I would like to set up a reverse proxy that checks if the site exists within a dynamic list of domains. I want this configure this way so the ...
0
votes
1answer
30 views

htaccess + htpasswd: how to prevent executing php scripts without specifying a password

My site is managed by Apache on Linux. In the base directory, there is the sub folder fill. In this subfolder, there is a php script: do.php Here is my .htaccess: AuthType Basic AuthName 'Welcome ...
0
votes
0answers
24 views

How to split a website's traffic into discrete chunks of bandwidth?

I'm running a website, which has several separate services available for users, like file storage, some sort of current financial data analysis download, and, of course, there's the website itself. ...
0
votes
0answers
18 views

ProxyPassMatch matching for empty directory irrespective of regex

I am trying to use ProxyPassMatch to proxy my PHP files to PHP-FPM. My line looks like this. ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/var/www/html/$1 It is proxy-ing the PHP scripts ...
0
votes
0answers
21 views

Apache Load Balancer — How to know which Route was chosen on 1st pass

I am using Apache 2.4.x to Load Balance (mod_proxy) for AB testing to slowly introduce a new server while we retire an old server & service. Everything I need is working, except for a small issue ...
0
votes
0answers
11 views

use VirtualHost *:443 as default for all unmatched ServerAlias [duplicate]

My apache is configured to use multiple VirtualHosts: default-ssl.conf for mydomain.tld and www.mydomain.tld and subdomain-le-ssl.conf for subdomain.mydomain.tld default-ssl.conf: <IfModule ...
0
votes
1answer
47 views

apache2.service: Failed to run 'start' task: No such file or directory

I can't restart my apache server on debian 9. I tried reinstall : sudo apt-get autoremove --purge apache2 && sudo apt-get install apache2 but no change... Job for apache2.service failed ...
0
votes
0answers
13 views

Apache Proxy - URL Resolution for a virtual host With proxy on CentOS 7

Here's what my environment looks like: REST api (laravel), running on http://xx.xx.xx.xx:8888/api Web application (Vue), running on http://xx.xx.xx.xx:8000/ Its' a development environment and we ...
0
votes
1answer
53 views

Using mod_rewrite to redirect single pages

The first requirement was to redirect traffic from http://www.old-domain.org to https://example.press -- but only do so for the root of the domain; any specific page should be available on the old ...
0
votes
2answers
645 views

Someone just trying to hack me? login.cgi+wget

I'm build a new server on Apache, actually I am learning, so I'm trying different things. My security system is already done, but of course I may miss something, or, if not, I do understand that today ...
0
votes
0answers
10 views

How to allow a user access to a page with js files but the user can't access them but the website/app can?

Is it even possible? I'm using Apache 2.4.33 on Windows 10. I have an audio player that has access to it permitted, but to go to the audio files and the player's files the user needs a password, ...
0
votes
1answer
41 views

Apache HTTPD proxy pass local DNS failure

I am running an Apache Tomcat and Apache HTTP using Docker in an Ubuntu VM on my Windows machine. I have configured my HTTP server (running on port 80) to reverse proxy requests to the Tomcat (running ...