How to Use Caddy as a Reverse Proxy

caddy webserver

Caddy is a powerful and user-friendly web server. One of its features is its ability to act as a reverse proxy, seamlessly directing client requests to the appropriate backend servers while offering robust security and performance benefits. To configure caddy as reverse proxy, add following to Caddyfile For reverse proxying to http port, add For … Read more

How to install lighttpd from source code

Lighttpd is a secure, fast, compliant, and very flexible web server that has been optimized for high-performance environments. In this post, we will be installing Lighttpd by compiling the source code. To install lighttpd from the source, first, let’s install the requirements For RHEL, CentOS, AlmaLinux, etc.. dnf -y install wget dnf -y group install … Read more

How to update LiteSpeed License from command line

LiteSpeed Webserver

If you want to change the License key for your LiteSpeed webserver, you can do the following. cd /usr/local/lsws/conf mv serial.no serial.no.old mv license.key license.key.old Create file vi serial.no Inside the file, paste your LiteSpeed webserver license key. Restart LiteSpeed /usr/local/lsws/bin/lshttpd -r /usr/local/lsws/bin/lswsctrl restart Verify LiteSpeed License with command /usr/local/lsws/bin/lshttpd -V See LiteSpeed

systemd service file for openlitespeed

To start/stop OpenLiteSpeed web server, you can use the following systemd service file vi /usr/lib/systemd/system/lshttpd.service Add following content [Unit] Description=OpenLiteSpeed HTTP Server After=network-online.target remote-fs.target nss-lookup.target Wants=network-online.target [Service] Type=forking PIDFile=/var/run/openlitespeed.pid ExecStart=/usr/local/lsws/bin/lswsctrl start ExecReload=/usr/local/lsws/bin/lswsctrl restart ExecStop=/usr/local/lsws/bin/lswsctrl delay-stop KillMode=none PrivateTmp=false Restart=on-failure RestartSec=5 # do not want to be limited in anyway CPUAccounting=false TasksAccounting=false MemoryAccounting=false [Install] WantedBy=multi-user.target Alias=lsws.service Alias=openlitespeed.service … Read more

Enable HTTP_X_FORWARDED_FOR in Haproxy

By default, Haproxy won’t forward visitor IP address to backend servers. To enable Haproxy forward visitor IP address to backend server using HTTP_X_FORWARDED_FOR header, edit haproxy.cfg vi /etc/haproxy/haproxy.cfg Add option forwardfor This can be added in blocks defaults, frontend, backend or listen. Example backend be_lamp mode http log global option forwardfor server fapi 10.0.3.106:80

Redirect HTTP to HTTPS with IIS 10

To redirect a domain to HTTPS, Click on the website in IIS, you will see If you don’t see the “URL Rewrite” button, you need to install “URL Rewrite” extension https://www.iis.net/downloads/microsoft/url-rewrite Click on “URL Rewrite” button. On the next screen click on “Add Rule(s)” link on the right side menu. Select “Blank Rule”, then click … Read more

Change SSH port in CyberPanel

CyberPanel Change SSH port

CyberPanel is a free open source control panel for web hosting. It use OpenLiteSpeed web server. You have the option to use Commercial LiteSpeed web server with CyberPanel. To change SSH port on CyberPanel server, login to CyberPanel, then go to Securiy > Secure SSH From the left side menu. On next page, you will … Read more

WebSocket

WebSocket Server is a technology that enables real-time communication between a web application and a server. It provides a bidirectional data transmission mechanism that allows both the client and the server to send messages to each other simultaneously. Unlike traditional HTTP communication, WebSockets enable full-duplex communication between the client and server, making it ideal for … Read more