Tag archive for ‘Apache’

DirectAdmin 1.391 : pcfg_openfile: unable to check htaccess file, ensure it is readable

Today, I got a problem with one of my website. Suddenly, I could access my website using Nginx but all themes were gone. I, then, switched back to Apache. It became worse. I can’t access my website at all. The error when access my website using Apache is below : Forbidden You don’t have permission [...]

Apache2 mod_fastcgi: Connect to External PHP via UNIX Socket or TCP/IP Port

Now, mod_fastcgi is configured and running. FastCGI supports connection via UNIX sockets or TCP/IP networking. This is useful to spread load among various backends. For example, php will be severed from 192.168.1.10 and python / ruby on rails will be severed from 192.168.1.11. This is only possible with mod_fastcgi. Required utilities You can spawn FastCGI [...]

500 error when you try to access the website

If the .htaccess has an error you should get a 500 error when you try to access the website. Is that the case? You can check if mod_rewrite is compiled in with Apache doing: httpd -l | grep mod_rewrite.c If it’s not then you should re-compile Apache. You could also enable mod_rewrite logging: RewriteLog “/var/log/httpd/rewrite.log” [...]

CentOS, Apache & mod_fcgid: IPCCommTimeout not working as expected

If you’re running Apache with the mod_fcgid module to let your PHP scripts be handled in a seperate module, you can run into this annoying little bug in the mod_fcgid 2.2.x implementations. The problem: mod_fcgid: read data timeout in xx seconds First, check if you have the mod_fcgid module that is causing these problems. # [...]

What is .htaccess and how to disable .htaccess?

What is .htaccess and how to disable .htaccess? .htaccess is use to modify the way Apache behaves for a directory and it’s sub-directories. It gives you an extra control on your server, like setting up custom error messages, password protect a directory, writing rewrite rules, blocking IPs etc. However, it can be a potentially dangerous [...]

Chroot Apache 2 Web Server

A chroot on Red Hat / CentOS / Fedora Linux operating changes the apparent disk root directory for the Apache process and its children. Once this is done attacker or other php / perl / python scripts cannot access or name files outside that directory. This is called a “chroot jail” for Apache. You should [...]

Mapping subdomains to parametered web pages in Apache

Mapping john.webserver.com to http://www.webserver.com/user.php?name=john is just by changing a few parameters in http.conf file In httpd.conf file, <VirtualHost se.rv.er.ip.ad.re.ss> ServerAdmin info@servername.com DocumentRoot /var/www ErrorLog /var/log/apache/apache-error.log TransferLog /var/log/apache/apache.log ServerName www.servername.com ServerAlias *.servername.com RewriteEngine on RewriteCond %{HTTP_HOST} !^www.* [NC] RewriteCond %{HTTP_HOST} ^([^\.]+)\.servername\.com RewriteRule ^/$ http://www.servername.com/user.php?user=%1 </VirtualHost> The lines for this feature, RewriteEngine on activating rewrite option RewriteCond [...]

Vbulltin PHP Xcache Displaying Same Forum Data For Both Boards Error and Solution

Q. I’ve followed your Xcache php 5.x opcode cacher installation under RHEL 5 for my vbulltin board. I see good boosting in performance. Now I’ve installed 2nd VB forum on the same server and I see all sub-forums hosted from 1st forum. So I had to disable Xcache. I want Xcache for both board on same host. How [...]

How To Configure The AIDE (Advanced Intrusion Detection Environment) File Integrity Scanner For Your Website

A file integrity scanner is something you need to have.  Imagine a hacker placing a backdoor on your web site, or changing your order form to email him a copy of everyone’s credit card while leaving it appear to be functionally normally. By setting up daily reporting, this notifies you within, at most, 24 hours [...]

Apache give each user their own cgi-bin directory

Apache has public_html directory support. With this you specify the name of the directory which is appended onto a user’s home directory if a ~user request is received. For example http://domain.com/~rocky/file.html will be rocky’s home directory /home/rocky/public_html/file.html. Recently I took small part time job to setup web server for university. I want to give every [...]