Configure Apache with multiple ProxyPass

Put the ProxyPass rules in the correct order as required if you want to evaluate /webhook1 rule and send it to 8080, else send the traffic to 8077 the rules should be on the following order ProxyPass /webhook1 http://localhost:8080 ProxyPassReverse /webhook1 http://localhost:8080 ProxyPass / http://localhost:8077 ProxyPassReverse / http://localhost:8077

.htaccess File Options -Indexes on Subdirectories

The correct answer is Options -Indexes You must have been thinking of AllowOverride All https://httpd.apache.org/docs/2.2/howto/htaccess.html .htaccess files (or “distributed configuration files”) provide a way to make configuration changes on a per-directory basis. A file, containing one or more configuration directives, is placed in a particular document directory, and the directives apply to that directory, and … Read more

Redirect HTTP to HTTPS:PORT in Tomcat

You can do it to every app deployed to tomcat by adding this to the end of tomcat_dir/conf/web.xml: <security-constraint> <web-resource-collection> <web-resource-name>Entire Application</web-resource-name> <url-pattern>/*</url-pattern> </web-resource-collection> <!– auth-constraint goes here if you requre authentication –> <user-data-constraint> <transport-guarantee>CONFIDENTIAL</transport-guarantee> </user-data-constraint> </security-constraint> So you don’t have to change it on the web.xml of your webapp. That should work, assuming you … Read more

Use a subdirectory as root with htaccess in Apache 1.3

Finally got it, after a week of trying. RewriteRules really are voodoo… RewriteEngine On # Map http://www.example.com to /jekyll. RewriteRule ^$ /jekyll/ [L] # Map http://www.example.com/x to /jekyll/x unless there is a x in the web root. RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !^/jekyll/ RewriteRule ^(.*)$ /jekyll/$1 # Add trailing slash to directories … Read more

Plack::App::CGIBin via Apache and mod_fastcgi – CGI script not found

I’d guess you need to change builder { mount “/plack” => $app; }; to builder { mount “https://stackoverflow.com/” => $app; }; because your alias is removing /plack/ or just change # URL to be handled by FastCGI Alias /plack/ /tmp/placktest.fcgi/ to # URL to be handled by FastCGI Alias /plack/ /tmp/placktest.fcgi/plack/ After all it does … Read more

How do I fix “ssl handshake failed” with ApacheBench?

ApacheBench doesn’t seem to be capable of ignoring certificate problems (at least some of them) so I wrote this script: #!/bin/bash K=200; HTTPSA=’https://192.168.1.103:443/’ date +%M-%S-%N>wgetres.txt for (( c=1; c<=$K; c++ )) do wget –no-check-certificate –secure-protocol=SSLv3 –spider $HTTPSA done date +%M-%S-%N>>wgetres.txt It’s not as precise as AB, but gives the idea. Does well in comparison tests.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)