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

Edit VirtualHost entry for the web site, add

Restart Apache

Now website will […]

Read More…

Apache Increase FD limit

On CentOS 7 sevrer running apache, when try to install plugin in WordPress admin area, i get error

This is due to Apache File Descriptor Limits. To see current Limits, use following PHP script

To see system wide limits, use following commands

Normally this will be high value. You need to increse […]

Read More…

gunicorn behind Apache web server

gunicorn is a python application server used to run python applications in production. This is normally run behind web servers like nginx or apache. To configre gunicorn behind apache, enable following apache modules.

Restart apache web server

For web site running pythin application, add a virtual host like following.

[…]

Read More…

Apache Invalid command AuthGroupFile

On Plesk server, i get following error on error_log for a site

This is because authz_groupfile apache module was not loaded. To load this, run

To verify the module is loaded, run

[…]

Read More…

Apache Limit access to a url

I want to limit access to admin login url of a web application to specified IP address. The web site had admin login in following URL https://domain.com/login To limit IP address, i edited Apache VirtualHost configuration for this web site, added

Restart apache

Or

Now only IP listed on the Allow from […]

Read More…

Ubuntu Apache Setup for WordPress

wordpress

On a Fresh Ubuntu 18.04 server, run following commands to setup Apache, PHP and MySQL needed for WordPress installation. You can go to each file and manually run the commands if you want to see what commands are executed.

At this stage, you have LAMP server setup and ready to go. To get your […]

Read More…

Cpanel ReverseProxy Traffic to Docker Container

Apache mod_proxy

On a cpanel server, i need to run a web application using docker container. Application running side docker container listening on port 8000 on localhost. For a web site to serve traffic from this docker container, we can use Apache mod_proxy, this is enabled by default on cpanel servers. https://httpd.apache.org/docs/2.4/howto/reverse_proxy.html You can verify it at […]

Read More…

Apache Benchmark

ab is a tool for benchmarking web servers. It is designed to give you an impression of how your web server installation performs. This especially shows you how many requests per second your web server is capable of serving. http://httpd.apache.org/docs/2.4/programs/ab.html To benchmark a web site, use ab command provided by Apache.

This will start […]

Read More…