November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

Categories

November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

ssl secure https and redirection

ssl secure https and redirection

NameVirtualHost *:80 NameVirtualHost *:443

<VirtualHost *:80>

DocumentRoot /usr/share/webmail ServerName webmail.rmohan.com RewriteEngine on RewriteCond %{HTTPS} !^on$ [NC] RewriteRule . https://%{HTTP_HOST}%{REQUEST_URI} [L] </VirtualHost>

<VirtualHost *:443> SSLEngine on SSLCertificateFile /etc/ssl/apache2/otherserver.crt SSLCertificateKeyFile /etc/ssl/apache2/otherserver.key ServerName webmail.rmohan.com SSLOptions StrictRequire SSLProtocol all -SSLv2 </VirtualHost>

 

 

Apache failed to start with the “No space left on device” error.

Apache failed to start with the “No space left on device” error. Error:- [error] (28)No space left on device: Cannot create SSLMutex Configuration Failed

These errors means that there is no available IPC (inter-process communication) resources in the system, such as semaphores or shared memory segments. You need to check IPC resources which are used […]

Mod Proxy Security to protect the page

Mod Proxy Security to protect the page <IfModule mod_proxy.c> ServerName rmohan.com ProxyRequests On SSLProxyEngine on ProxyVia On <Proxy https://dev.rmohan.com/web/app/app1*> Order deny,allow Allow from all </Proxy> ProxyPass web/app/app1 https://dev.rmohan.com/web/app/app1 ProxyPassReverse web/app/app1 https://dev.rmohan.com/web/app/app1 <Proxy https://dev.rmohan.com/web/CVS*> Order deny,allow Deny from all </Proxy> <Proxy https://dev.rmohan.com/web/app/app1/CVS*> Order deny,allow Deny from all </Proxy> </IfModule>

How to secure reverse proxy or Forward proxy

How to secure reverse proxy or Forward proxy

 

ProxyPreserveHost On

<Proxy *> Order deny,allow Allow from all </Proxy>

ProxyPass /gonvaled/examples/jsonrpc/output/services/ http://localhost:8000/services/ ProxyPassReverse /gonvaled/examples/jsonrpc/output/services/ http://localhost:8000/services/

<IfModule mod_proxy.c> #turning ProxyRequests on and allowing proxying from all may allow #spammers to use your proxy to send email.

ProxyRequests Off <Proxy *> AddDefaultCharset off Order Allow,Deny Allow from […]

Limiting large requests in apache

Limiting large requests in apache Apache has several directives that allow you to limit the size of a request, this can also be useful for mitigating the effects of a denial of service attack.A good place to start is the LimitRequestBody directive. This directive is set to unlimited by default. If you are allowing file […]

Forcing HTTP traffic over HTTPS using Apache

Forcing HTTP traffic over HTTPS using Apache

I recently was required to redirect all traffic for a domain over an HTTPS connection. Using the Apache’s .htaccess files and the RewriteEngine, this task is trivial.

Insert this block of code into your .htaccess file at the root of your domain. This will redirect at HTTP traffic […]

How to disable directory browsing in apache/httpd?

How to disable directory browsing in apache/httpd?

 

How can I disable building of directory index in apache/httpd? In other words, how to prevent users from seeing the contents of published directories?

 

Actually you are totally right that you wish to disable this feature. One of the “must do’s” on setting a secure apache […]

Apache Server Load Balancing for Multiple Virtual Hosts Tomcat

Apache Server Load Balancing for Multiple Virtual Hosts Tomcat

 

apache vi /etc/http/conf/httpd.conf

NameVirtualHost *:443 NameVirtualHost *:80

<VirtualHost *:80> ServerName server1.rmohan.com Redirect permanent / https://server1.rmohan.com/ </VirtualHost>

<VirtualHost *:443> ServerName server1.rmohan.com SSLProxyEngine On KeepAlive On

<Proxy balancer://Cluster> BalancerMember ajp://localhost:18009 disablereuse=On route=jvm1 BalancerMember ajp://localhost:28009 disablereuse=On route=jvm2 </Proxy>

ProxyPass / balancer://Cluster/ stickysession=JSESSIONID </VirtualHost>

<VirtualHost *:80> ServerName server2.rmohan.comm Redirect […]

Apache mod_proxy as Load Balancer

Apache mod_proxy as Load Balancer

This article presents an example of load balancing using Apache2.

For example take the host 192.168.1.100 as a balancer, this host will install the apache front end acting for all requests and will balance the load on other hosts.

The load is redirected to the host […]

Performance Benchmarks a Webserver Apache concurrency

Performance Benchmarks a Webserver

Apache Benchmark Procedures

Tweak include the KeepAlive, KeepAliveTimeout, and MaxKeepAliveRequests settings. Recommended settings, which can all be set in the httpd.conf file, would be:

Code: ServerLimit 128 MaxClients 128 KeepAlive On KeepAliveTimeout 2 MaxKeepAliveRequests 100

Testing a stock Apache configuration (MaxClients is 256, ServerLimit is 256, KeepAliveTimeout is 15) using […]