Choose between two types of web server
Step 1:
Point the domain to your Linux server IP using your DNS manager (e.g., point client.example.com to 127.0.0.0).
Step 2:
Run the following commands on your Linux server:
sudo apt install -y python3-certbot-nginx nginx ufw allow 80 && ufw allow 443 rm /etc/nginx/sites-enabled/default certbot certonly --nginx -d example.com nano /etc/nginx/sites-enabled/holaclient.conf
Step 3:
Copy the following config and paste it into holaclient.conf and replace all the necessary informations:
server { listen 80; server_name [holaclient domain]; return 301 https://$server_name$request_uri; } server { listen 443 ssl http2; location /afkwspath { proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_pass "http://[ip or domain of node]:[port]/afkwspath"; } server_name [holaclient domain]; ssl_certificate /etc/letsencrypt/live/[holaclient domain]/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/[holaclient domain]/privkey.pem; ssl_session_cache shared:SSL:10m; ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers HIGH:!aNULL:!MD5; ssl_prefer_server_ciphers on; location / { proxy_pass http://[ip or domain of node]:[port]/; proxy_buffering off; proxy_set_header X-Real-IP $remote_addr; } }
After that, press CTRL+X,Y then ENTER to exit out of nano.
Step 4:
Verify that your nginx config is correct using this command:
sudo nginx -t
If everything is correct, you can restart nginx using this command:
sudo systemctl reload nginx
Congrats! You have successfully made up to here!
Step 1:
Point the domain to your Linux server IP using your DNS manager (e.g., point client.example.com to 127.0.0.0).
Step 2:
Run the following commands on your Linux server:
sudo apt install -y apache2 python3-certbot-apache ufw allow 80 && ufw allow 443 sudo a2dissite 000-default sudo certbot --apache -d example.com sudo nano /etc/apache2/sites-available/holaclient.conf
Step 3:
Copy the following config and paste it into holaclient.conf and replace all the necessary informations:
ServerAdmin [email protected] ServerName [holaclient domain] Redirect permanent / https://[holaclient domain]/ ServerAdmin [email protected] ServerName [holaclient domain] DocumentRoot /var/www/html SSLEngine on SSLCertificateFile /etc/letsencrypt/live/[holaclient domain]/fullchain.pem SSLCertificateKeyFile /etc/letsencrypt/live/[holaclient domain]/privkey.pem Options Indexes FollowSymLinks MultiViews AllowOverride All Require all granted ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined ProxyPass /afkwspath http://[ip or domain of node]:[port]/afkwspath ProxyPassReverse /afkwspath http://[ip or domain of node]:[port]/afkwspath ProxyPass / http://[ip or domain of node]:[port]/ ProxyPassReverse / http://[ip or domain of node]:[port]/
After that, press CTRL+X,Y then ENTER to exit out of nano.
Step 4:
Verify that your apache config is correct using this command:
sudo apache2ctl configtest
If everything is correct, you can restart apache using this command:
sudo systemctl restart apache2