New answers tagged

1

Seems like you can get the behavior you want by setting something like: ErrorDocument 400 https://vhost:4433/ Source: Apache: insecure request sent to secure port...want to redirect


0

You can indicate what the link points to in the "Description" field in the table. I wrote a shell script (GPL v3) that helps you generate .htaccess files with the appropriate AddDescription lines: #!/bin/bash # vi: et sts=4 sw=4 ts=4 # Usage: make-descriptions [DIR]... # By default, adds a .htaccess file to '.' set -e shopt -s nullglob if [[ $# ...


0

this is what get_wsgi_application is doing: def get_wsgi_application(): django.setup(set_prefix=False) # this will lead to "apps_ready=true" return WSGIHandler() it is setting up the django environment before returning the handler. The following should do the trick in your wsgi.py: application = get_wsgi_application() from django....


0

Instead of writing this out again, I'm going to quote and link to my previous answer: As of 2021, some of the "improvements" that Litespeed has developed vs. Apache are more theoretical than practical, such as HTTP/3 support (UDP-only) which is not even widely supported: https://stackoverflow.com/questions/60701073/any-benchmarks-showing-litespeed-...


3

Configure your backend server with the correct base url. That's much easier than forcing rewrites on the proxy. The setting should be JAWANNDENN_URL_PREFIX . Just set it to /jaw and all URLs should be generated properly. Your first example should then work, even without the ProxyHTMLURLMap and the OutputFilter.


0

please delete this post


0

I solved my issue, where I placed all my redirections inside this file gone_redirections.conf and then included them with Include conf.d/gone_redirections.conf


1

Isn't the .php after %{REQUEST_FILENAME} redundant? The variable should already contain the .php, right? Well, yes and no, it depends what you are trying to do. RewriteCond %{REQUEST_FILENAME}.php -f RewriteRule ^ %{REQUEST_FILENAME}.php [L] This rule allows you to request extensionless URLs. eg. /index or /foo and this internally rewrites the request to /...


1

It's normal behavior. You can also add other trailing slashes or letters like: http://example.com/exists.php/path/to/ http://example.com/exists.php/otherpath it's also used by so some PHP frameworks for URL routing without mod_rewrite.


0

When you use MPM worker, requests are handled by threads that exist in processes. From https://httpd.apache.org/docs/2.4/mod/worker.html A single control process (the parent) is responsible for launching child processes. Each child process creates a fixed number of server threads as specified in the ThreadsPerChild directive, as well as a listener thread ...


0

You can use regexp: <If "%{HTTP_USER_AGENT} =~ /Mobile/"> Require all denied </If>


0

The only solution that was working for me, is: AddOutputFilterByType INFLATE;SUBSTITUTE;DEFLATE text/html Source: https://phabricator.wikimedia.org/T282613 https://gitpull.it/T776


1

Turns out the problem isn't in the configuration. The port I'm using is simply not forwarded and something else listening to it, thus making open port checker showing the port as open.


1

now I want apache to allow visiting every file in public_html, even if the owner is root and not alex. how to do that? Short answer: You can't. Slightly longer answer: You shouldn't. Learn about Linux File System permissions and how to work with them. Trying to "force" your way around them will only give you trouble, later on. I'd suggest that you:...


1

Apache run under www-data user. This user have certain privileges, but not enought to read root's files. A solution is to add www-data group to files : chgrp www-data /path/to/files ; then adjust permission of files to allow group members to read these files : chmod g+r /path/to/files An other solution, not really recommanded, is to allow other to read files ...


1

None of your example IPs are in the same /64 subnet, they can't all match your IP. Compare the 3rd and 4th digit group. Starting with an IP address, chop off digits at the least-significant end. Use the number of bits remaining in CIDR slash notation. Write out the recommended form with :: compressing as many zeros as possible. For example, take IP address ...


0

Let's follow the boolean logic of the rules as they would stand: <RequireAll> ### First, and foremost, users need to be Apache users. Require ldap-attribute companyMemberOf="ALL_APACHE_USERS" ### AND <RequireAny> ##### Users need to be either valid Require valid-user ##### Or have the appropiate claim. Require ...


1

What finally helped me were Apache Rewrite rules and LogLevel alert rewrite:trace6. In this case it appears that in addition to some .htaccess files (I didn't think had any effect) there were some internal redirects in the code. So I ended up using in the VirtualHost section something like: RewriteCond %{REMOTE_ADDR} !1.2.3.4 RewriteCond %{REQUEST_URI} !^/...


0

After seeing some more examples around, I just tried another version of encoding the ProxyPass line as follows and it worked for me: httpd.conf ------------ <VirtualHost *:2022> ProxyPass / unix:/home/user/flask_app/myproject.sock|uwsgi://localhost/ </VirtualHost>


0

Solved: https://stackoverflow.com/questions/30880975/how-to-style-directory-listings-with-apache-mod-autoindex-using-namewidth-html#55087425 Enable the autoindex mod, then add a stylesheet in the home (/) directory of your vhost like so: <VirtualHost *:80> # all other config <IfModule mod_autoindex.c> IndexOptions FancyIndexing HeaderName ...


0

You could handle the protocol in your receiving app, no need to have https:// in the url right? Perhaps use nginx as substitue for the proxy?


0

In the first example, I think you get blocked because the Directory directive takes over the Location directives: <Directory /site/dir> Require ip 1.2.3.4 </Directory> <Location "/open/for/public1"> Require all granted </Location> <Location "/open/for/public2"> Require all granted </Location&...


0

for ubuntu, apache2 web server enable the mod, with the following commands a2dismod cgi and with cd /etc/apache2/sites-available vim 000-default.conf add the following: <Directory /var/www/vhosts/YOUR-DOMAIN.COM/httpdocs> AddType text/html .shtml AddOutputFilter INCLUDES .shtml Options +Includes </Directory>


0

Maybe you are facing the same problem I had: During an automatic update, my package manager injected a config file with another "Listen 443" directive. grepping for "^Listen 80" into files appended to httpd.conf (usually those inside conf.d, sites-available, etc) should help you find the cause of this error.


0

The instruction "CGIPassAuth On" solved my problem. My config changed from <Files ~ "\.php$"> ProxyFCGIBackendType FPM SetHandler "proxy:fcgi://127.0.0.1:9002#" </Files> </VirtualHost> to <Files ~ "\.php$"> CGIPassAuth On ProxyFCGIBackendType FPM ...


1

This worked for me! Requirements: Apache Tomcat on :8443 with self-signed key Apache HTTPD with Reverse Proxy to localhost:8443 Tomcat Apache HTTPD REQUIRES Client Mutual Authentication. If that is not a requirement for you, then set: SSLVerifyClient none Apache HTTPD will pass along the X.509 identity of the caller through the reverse proxy to tomcat. ...


0

It seems that only HTTP is allowed. Check this bug: https://bz.apache.org/bugzilla/show_bug.cgi?id=62120


1

The webserver on the shared IP-address (192.168.168.168) relies on the Host header with a known host/domain-name to display the correct content. You can normally achieve that easily by actually using that host/domain-name in the ProxyPass directive : <Location /> ProxyPass http://domain2.com/ ProxyPassReverse http://domain2.com/ </Location&...


Top 50 recent answers are included