Stack Exchange Network

Stack Exchange network consists of 175 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

New answers tagged

0

The exemplified code in your question looks OK in itself, providing: You do not have an OR flag on the preceding condition that would make the next condition (that excludes the specific URL-path) optional. These directives are sufficiently early in your config so as to avoid conflicts with other mod_rewrite directives. Note that the REQUEST_URI server ...


0

Most likely you have one more Python interpreter installed on the box. To check that do the following: From server console run python and execute these command: import sys print sys.path Create a test Flask app run.py below, place it into /var/www/im/ folder and edit WSGI file to load it: from run import app as application import sys from flask import ...


2

Modify wp-config.php and add WP_HOME and WP_SITEURL. https://wordpress.org/support/article/changing-the-site-url/ Or just change it on your database (inside wp_options)


1

You could be more restrictive in your RewriteRule pattern so to create a backreference that excludes the path-info by matching only upto and including the file extension and use the full URL-path (ie. REQUEST_URI) in the substitution instead. For example: RewriteCond %{DOCUMENT_ROOT}/../legacy/public$1 -f RewriteRule ^(.+\.php) /legacy_public%{...


0

I was not able to conclude beyond proxy-balancer.conf miss configuration. Not sure what. I copied the configured Apache/2.4.17 and managed to delete the older apr and finally able to solve the purpose for now.


0

I finally solved my problem ! Thx to the log error message, I found a solution to generate a valid certificate, with this command : sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/pki/tls/private/localhost.key -out /etc/ssl/certs/localhost.crt Originaly I was following this article to set up SSL on my EC2 instance : https://docs.aws....


0

I just found another log file that provide more informations apparently : [Wed Jun 12 08:31:42.263711 2019] [ssl:emerg] [pid 16968] AH02565: Certificate and private key ip-xx-xx-xx-xx.eu-west-3.compute.internal:443:0 from /etc/pki/tls/certs/localhost.crt and /etc/pki/tls/private/localhost.key do not match


0

As requested, here are my conf files for apache : /etc/httpd/conf/httpd.conf (auto generated by AWS services) ServerRoot "/etc/httpd" Listen 80 Include conf.modules.d/*.conf User apache Group apache ServerAdmin root@localhost <Directory /> AllowOverride none Require all denied </Directory> DocumentRoot "/var/www/html" <...


0

Examine the application server to determine why it is unresponsive. Many possible causes: unable to access database, hit resource limits, crashed, performance problem. Confirm that your web server has caching on. For Apache httpd this would be from mod_cache. Put the instances behind a load balancer. Allows analytics on requests, and maybe scale out to ...


0

There are different ways to mitigate DDOS attacks. Check below some points that you may consider: 1.) Reduce the attack surface for your GCE deployment 2.) Isolate your internal traffic from the external world 3.) DDoS Protection by enabling Proxy-based Load Balancing 4.) Scale to absorb the attack 5.) Protection with CDN Offloading 6....


0

After looking at a similar situation, I found the solution to this problem - there's a variable named REDIRECT_STATUS[ref] that will be set by apache when apache looks up the ErrorDocument internally. So using the variable, I can add a new rewrite condition to allow apache to exclude actual 404 from being rewritten: <Location /404.html> ...


0

How about doing something like this : ec2 with apache installed on local SSD Dynamic content hosted on Amazon EFS mount Create subdomain for static content and host on S3 with CDN Caching


0

You need modify the RewriteCond, this because the REQUEST_URI includes everything after and including the forward slash. Example: http://www.example.com/server-status/ REQUEST_URI = /server-status/ The ^ mean defines that the patter must start at beginning of a new line and .* finds any character sequence. <VirtualHost *:80> ServerName some-...


0

The answer is to use OpenSSL 1.1.1. I was thrown off by searches which gave old advice saying not to use 1.1.1. The Apache change log is a good place to find out what version is supported: https://www.apachelounge.com/Changelog-2.4.html


0

Woocommerce is based on WordPress. WordPress uses the Entity-Attribute-Value schema pattern. EAV does not scale well. Furthermore, WP implements EAV inefficiently. Here is the major issue that I have found. Following the advice there should speed up postmeta and similar tables. As for the metrics you found... It is rare for MySQL to chew up the entire ...


1

The best option would be to configure your application server to generate the correct URLs to be used with the proxy. However, if you can't do that, you can use another Apache module, mod_proxy_html. This module provides the directive ProxyHTMLURLMap, which you can use to rewrite the response. ProxyPass / https://localserver/ ProxyPassReverse / https://...


1

Apache cannot know to serve the hostname unless you put it in its configuration somehow. If you don't intend to serve a site on the other hostname, then you can simply let it go to the default virtual host and get a 403/404, or you can create a new virtual host that does WWW redirection. But regardless, you have to decide how these requests should be ...


1

You can perhaps use an Apache expression (Apache 2.4+) to only apply the HTTP Basic Auth directives when the request method is not "OPTIONS". For example: <If "%{REQUEST_METHOD} != 'OPTIONS'"> # Authentication directives... </If> Reference: https://httpd.apache.org/docs/2.4/expr.html deny from all You shouldn't need to use this (Apache 2.2) ...


1

I had this problem with a buggy java application that was returning a "Location: http://foo.bar\n" (note that \n at the end). I didn't have access to the application source code to solve the problem, so I had to do a workaround by telling apache to fix the headers using mod_header The solution was: Header edit Location "\n$" "" I did some tests, ...


1

The a2ensite command creates a symbolic link to the particular configuration file from sites-enabled to sites-available. If you have already enabled a site's config and make modifications to it you do not need to enable it again and can simply use graceful or reload. Ie: The apache2.conf file has an include for sites-enabled/* You make a site specific ...


0

This same thing happened to me, turned out the ProxyPass directive had a character deleted from the end, the ending slash on the forward address. i.e. ProxyPass \ https:\\foo.com Should have been ProxyPass \ https:\\foo.com\


-2

As far as i can see you have quite a hardware, should deal with the job. I search the web with some advices for your case and the list came up right away ... What Causes WordPress Website Performance to Falter? Images are uploaded at unnecessarily large sizes. Images haven’t been compressed. Pages are too long or contain too much dynamic content. Themes ...


0

I am using Ubuntu 18.04 Subsystem for Windows 10 and I had that problem when starting my apache2 service for the first time,to fix that you have to recover your apache2-utils by typing these commands in your terminal : sudo apt-get remove --purge apache2 apache2-utils sudo apt-get install --reinstall apache2 apache2-utils sudo service apache2 start and ...


0

This can be done with RewriteEngine: <VirtualHost _default_> ServerName example.com Alias /.well-known/acme-challenge/ /letsencrypt/.well-known/acme-challenge/ RewriteEngine On RewriteCond %{REQUEST_URI} !^/.well-known/ RewriteRule /(.*) https://example.com/$1 [R,L] </VirtualHost>


0

As I understand, IP1 as a reverse proxy for IP2. So I suggest you use Nginx to do this as below: location /route { proxy_pass http://192.168.11.3:80/; } Also you can read more about proxy_pass at here. Hope this helps.


1

You can use "Header" directive and edit particular header. And the directive will look like: Header edit Link expr="/foo/bar" /api/v1/foo/bar You you need to replace also localhost you can add one more directive Header edit Link expr="localhost" your_host_name To use hostname you can use variable HTTP_HOST Header edit Link "http://navigator:5000/" "${...


1

It can be more complex, too. For example a script in your website that does not deliver a result but is requested frequently. This is often the case when an AJAX based JavaScript application is executed in a browser, constantly sending requests to the server while the server-side script delivers no output. This results in a very high number of processes that ...


0

This save my life (from https://www.php.net/manual/en/curl.installation.php) Upgrading to php 7.1.6 on Apache 2.4 32bit version Windows 7 x64 this curl implementation works: C:/(path to php folder)/php.ini enable extension=php_curl.dll libeay32.dll, ssleay32.dll, libssh2.dll find directly in php7 folder add this to Apache/...


2

SIGTERM sent to httpd means stop now. Find what is sending this signal. killsnoop is an easy script to do this. However, BPF won't be available on Debian 9. (Sometimes digging in the bcc repo reveals other pre-BPF implmentations, but not always.) Or, you can setup auditd to log kill syscalls. Anti-patterns to look for, in crontabs and anywhere else: ...


0

in httpd.conf , uncomment these lines LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_http_module modules/mod_proxy_http.so and <VirtualHost foo.com:80> ProxyPass / "http://localhost:5000/" </VirtualHost> in C:\Windows\System32\drivers\etc\ add this line 103.48.xxx.xxx foo.com In domain DNS administration page, add record ...


0

In order for Redirect to be effective within an .htaccess file, you must allow the FileInfo override in your virtual host definition in your httpd.conf configuration file: <VirtualHost *:80> ServerName www.example.com ServerAlias example.com ... blah blah <Directory "/"> ... AllowOverride FileInfo ... </Directory&...


0

If you have CloudFront already enabled you could add WAF protection although it seems overkill for this use-case. You could also try using NGINX instead of Apache which is going to be lighter-weight and therefore less likely to run out of resources. Does CloudWatch yield any insights into why it is crashing? Perhaps you can identify what resource is being ...


10

curl: (6) Could not resolve host: mywebsite.org ^^^^^^^^^^^^^^^^^^^^^^ You have a DNS problem: www.mywebsite.org has an associated address in the DNS, mywebsite.org does not. Therefore, a HTTP request to http://mywebsite.org/ does not even reach your server, because that name cannot be resolved.


1

The first part of your linked suggestion has this SecAction "phase:1,nolog,pass,initcol:IP=%{REQUEST_HEADERS.x-forwarded-for}" As you can see it specifies that x-forwarded-for is part of REQUEST_HEADERS but that is missing from your version of this. Do be aware that just logging the IP will not cause blocking. It is used to persist data that can be used ...


2

It looks that you placed certificate files inside Public html diretory: /var/www/html/cert/... This may be security measure to prevent of using such certificates. Move cert diretory one level up: mv /var/www/html/cert /var/www/ set the readable for apache user (Ubuntu and debian systems use user www-data) chown -R apache /var/www/cert Change the ...


2

You can't load two different PHP modules at the same time. Full stop. This is why you must use php-fpm to run different PHP versions.


-2

I had the same issue. Switching to two single-slot SSLs did the trick.


3

You can only use LoadModule in the context of a server config (httpd.conf) or virtual host. It does not work in a directory context.


2

While you are developing you can restrict access to the instance only to your IP address(es) - set them in the instance Security Group. That will prevent access from anyone else but you. On the other hand the instance shouldn't be failing just because it gets a few random requests. There may be a problem with your code - memory leak perhaps? Now is a good ...


0

As far as I can tell, the problem was happening because the domain was listed in the /etc/hosts file and set in /etc/hostname. Removing it from there seemed to fix the problem.


Top 50 recent answers are included