HTML

How to Redirect Web Page

Posted on
Redirect Web Pages As time goes by, we may want to change URL of website into optimized ones for search engines in order to rank higher. Furthermore, replacing old domain name into a keyword-focused one to reconstruct our URL strategies. Therefore, We need skills to redirect web pages to new URL. Here I list 5 […]
Apache

How to Resolve Too many open files AH00132: file permissions deny server access

Posted on
Saw some errors in httpd log:[Sat Jun 10 18:20:54.048569 2017] [core:error] [pid 5596] (24)Too many open files: [client 123.123.123.123:56399] AH00132: file permissions deny server access: /var/www/html/logo.png, referer: http://logic.edchen.org/Check the resource limit on open files. This includes hard limit and soft limit.[root@test ~]# ulimit -H -n4096[root@test ~]# ulimit -S -n1024It could be too small to support […]
Apache

How to Make httpd.conf Take Effect Without Restart

Posted on
Since restarting httpd service may cause connections disrupted for seconds, you may use reload action instead of restart to make your httpd server apply new configuration in httpd.conf without interrupt online connections.In EL6, you can use this command:[root@test ~]# service httpd reloadIn EL7, you can use this command:[root@test ~]# systemctl reload httpd
Apache

How to Install Newest LAMP on CentOS 7.2 Minimal (2/4) – Install Apache httpd 2.4.6

Posted on
Check the version in the repository.[root@test ~]# yum info httpdLoaded plugins: fastestmirrorLoading mirror speeds from cached hostfile * base: ftp.ksu.edu.tw * extras: ftp.ksu.edu.tw * updates: ftp.ksu.edu.twAvailable PackagesName        : httpdArch        : x86_64Version     : 2.4.6Release     : 40.el7.centosSize        : 2.7 MRepo        : base/7/x86_64Summary     […]
Apache

How to Enable Dynamic robots.txt with Virtual Hosts

Posted on
The following configuration can enable the rewrite rules of your virtual hosts and make robots.txt point to any other dynamic file (e.g. robots.php or robots.asp) which can change content dynamically.Add rewrite rules into <Directory> within the Virtual host.[root@test ~]# vi /etc/httpd/conf/httpd.conf…<VirtualHost *:80>    DocumentRoot “/var/www/html/example”    ServerName www.example.com    …    <Directory “/var/www/html/example”>        […]