MySQL cannot connect via localhost

On an Apache server, MySQL can’t connect when you use localhost, but it work when you chane to IP address 127.0.0.1 When you use “localhost”, it use socket for connecting to MySQL server, this is faster than using TCP/IP connection, that is used when you use IP address to connect to MySQL server. First find … Read more

Install LAMP Server on Ubuntu/Debian

To install LAMP (Apache, MySQL, PHP) on Ubuntu/Debian web server, run apt-get install lamp-server^ This use meta package install LAMP. If you want to remove, don’t remove the meta package as it will remove many other required packages. You need to remove packages one by one. Related Posts Apache MySQL

Apache Show Real IP Address when using CloudFlare

When using Apache web server behind cloudflare, apache logs show cloudflare IP address instead of real visitor IP address. To show actual visitor IP address, you can enable remoteip apache module. On Debian/Ubuntu server: On RHEL/CentOS/Fedora, it is Usually enabled by default; check with: Cloudflare publishes its IP ranges here: IPv4: https://www.cloudflare.com/ips-v4IPv6: https://www.cloudflare.com/ips-v6 Create file … Read more

Apachectl

apachectl command is used to interact with Apache web server. To see Apache status apachectl status To list virtualhost info, run apachectl -t -D DUMP_VHOSTS List VirtualHost + server config. apachectl -S To list loaded apache modules, run apachectl -M Related Posts Apache Web Server apachectl status www-browser not found

Disable Apache Error log in ISPConfig

ISPConfig is a free hosting control panel. It come with Nginx and Apache web servrs. You can select one during installation. if you are using Apache web server with ISPConfig and want to disable Apache Error logs, then do the following cd /etc/apache2/sites-available sed -i ‘s/ErrorLog .*/ErrorLog \/dev\/null/g’ * Now restart Apache systemctl restart apache2 … Read more

Apache run web site as user with mod_ruid2

mod ruid2 allow you to run web site as differnt user from the one web server is running. This is helpfull when you have multiple web sites on same Apache web server. To install mod_ruid2 on Ubuntu/Debian server, run apt install libapache2-mod-ruid2 Edit VirtualHost entry for the web site, add RMode config RUidGid USERNAME_HERE GROUP_HERE … Read more

Apache Increase FD limit

On CentOS 7 sevrer running apache, when try to install plugin in WordPress admin area, i get error Installazione fallita: Il download non รจ andato a buon fine. cURL error 35: Process open FD table is full This is due to Apache File Descriptor Limits. To see current Limits, use following PHP script