peterjpxie / VPN_Website

Personal VPN website based on lighttpd

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Personal VPN website

How to deploy on Ubuntu

  1. Clone or copy website files to server, e.g. /root/website.

  2. Install lighttpd

apt-get install lighttpd

  1. Configure lighttpd.conf

vi /etc/lighttpd/lighttpd.conf

server.document-root        = "/root/website"   -> Path of Website html files.
\#server.username             = "www-data"       -> Disable authentication
\#server.groupname            = "www-data"       -> Disable authentication
server.port                 = 80
  1. Restart lighttpd

systemctl restart lighttpd

  1. Add accept rule for port 80 in IPtable.

run command:

iptables -I INPUT -p tcp --dport 80 -j ACCEPT

To enable it on bootup:

Add this line in /etc/rc.local before last line 'exit 0'.

vi /etc/rc.local:

# Added for HTTP server
iptables -I INPUT -p tcp --dport 80 -j ACCEPT
exit 0

Done! Now you can visit the website by server IP or hostname.

  1. Disable lighttpd on bootup

lighttpd service is started on OS bootup. If you want to disable it from bootup, run:

systemctl disable lighttpd

It actually moves /etc/rc[2-6].d/S03lighttpd to /etc/rc[2-6].d/K01lighttpd. To restore, run:

systemctl enable lighttpd

About

Personal VPN website based on lighttpd


Languages

Language:HTML 88.4%Language:Python 11.2%Language:Shell 0.5%