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  

htaccess

What is .htaccess for? .htaccess syntax

Forbidding access:

Forbidding all files Allow access from a certain IP address Forbid access from a certain IP address Forbidding a group of files by mask Forbidding a particular file

Setting a password:

Password for a directory Password for one file only Password for a group […]

OpenSSL Commands

General OpenSSL Commands

These commands allow you to generate CSRs, Certificates, Private Keys and do other miscellaneous tasks.

Generate a new private key and Certificate Signing Request

openssl req -out CSR.csr -new -newkey rsa:2048 -nodes -keyout privateKey.key

Generate a self-signed certificate (see How to Create and Install an Apache Self Signed Certificate […]

Automatic unlimited subdomains via Apache mod_rewrite

Wondering how blogger website gives you a subdomain from the blogspot.com domain based on your username of your choice? Well, the concept for this tutorial is somewhat related with it on setting up unlimited subdomains. I’m not sure how do they do it because it could be done by any script, hardcoded or not, thru […]

Splitting up Apache Logs for Subdomains

Splitting up Apache Logs for Subdomains

1. Make sure your multiple virtual hosts log to the same log file.

example:@ your config file

ErrorLog “|/usr/sbin/rotatelogs -l /var/log/httpd/linux/error_log.%Y%m%d 86400?CustomLog logs/linux/access_log combinedioCustomLog “|/usr/sbin/rotatelogs -l /var/log/httpd/linux/access_log.%Y%m%d 86400? combinedio

2. Change your Apache LogFormatfrom let say:#LogFormat “%h %l %u %t \”%r\” %>s %b \”%{Referer}i\” \”%{User-Agent}i\”” combined

to:LogFormat “%V […]

Best Practices for Speeding Up Your Web Site

Minimize HTTP Requests

tag: content

80% of the end-user response time is spent on the front-end. Most of this time is tied up in downloading all the components in the page: images, stylesheets, scripts, Flash, etc. Reducing the number of components in turn reduces the number of HTTP requests required to render the page. This […]

How to disable Core file generation Apache

First of all delete the core files which are preset on the server or under any account then

vi /etc/init.d/httpd

and below the “ulimit -n 16384? you need to put

ulimit -c 0

And Command to delete core files

#find ./ -name “core.*” -exec rm -f {} \;

ProxyPassReverse

am using mod rewrite to mask the context root of my application. For example,

RewriteRule ^/directory/(.*) balancer://appcluster/directory/$1 [P]

The appcluster looks like this:

<Proxy balancer://appcluster> BalancerMember http://localhost:8080/App route=app_01 keepalive=On loadfactor=1 ttl=300 min=3 smax=5 max=15 ProxySet lbmethod=byrequests stickysession=JSESSIONID|jsessionid timeout=120 nofailover=On </Proxy>

Do I need to use ProxyPassReverse at all? I used to use it because my […]

HTTP Status Codes for Beginners

All valid HTTP 1.1 Status Codes simply explained. This article is part of the For Beginners series.

HTTP, Hypertext Transfer Protocol, is the method by which clients (i.e. you) and servers communicate. When someone clicks a link, types in a URL or submits out a form, their browser sends a request to a server for […]

url redirection in apache using proxypass

Url redirection in Apache web server.

Here is a small example of url redirection in Apache using proxypass. I used this when I was using Apache as proxy to Apache tomcat using mod_jk.

Example: you want to forward www.yourdomain.come/abc to www.yourdomain.com/linux/commands/abc

Here is how you can do it. Open httpd.conf in your favorite editor. Add […]

(13)Permission denied: make_sock: could not bind to addres

Permission denied: make_sock: could not bind to address Stopping httpd: [FAILED]Starting httpd: (13)Permission denied: make_sock: could not bind to address [::]:88(13)Permission denied: make_sock: could not bind to address 0.0.0.0:88no listening sockets available, shutting downUnable to open logs [FAILED]

In apache, this type of error occurs at the time of starting the service after editing the […]