Skip to content

Instantly share code, notes, and snippets.

@ThienTranDuy
Last active November 27, 2020 08:44
Show Gist options
  • Save ThienTranDuy/2ddb436c5393f19befaaa4b7fff760bd to your computer and use it in GitHub Desktop.
Save ThienTranDuy/2ddb436c5393f19befaaa4b7fff760bd to your computer and use it in GitHub Desktop.
Config port Node in Apache httpd.config/vhost.config
ServerName `YOURSERERIP - 192.123.16.789`
# Listen `YOURPORT - 4200`
<VirtualHost `DOMAIN - YOURDOMAIN.COM`:*>
ServerAdmin `YOURE MAIL - yourmai@email.com`
ServerName `DOMAIN - YOURDOMAIN.COM`
ServerAlias `DOMAIN - YOURDOMAIN.COM`
ProxyRequests Off
ProxyVia Full
<Proxy *>
Require all granted
</Proxy>
SSLEngine on
SSLProtocol all
SSLCertificateFile /etc/letsencrypt/live/`DOMAIN - YOURDOMAIN.COM`/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/`DOMAIN - YOURDOMAIN.COM`/privkey.pem
<Location />
ProxyPreserveHost On
ProxyPass http://localhost:`YOURPORT - 4200`/
ProxyPassReverse http://localhost:`YOURPORT - 4200`/
</Location>
DocumentRoot /var/www/html/`YOURfolder - domain.com`
<Directory />
Options -Indexes +FollowSymLinks
AllowOverride None
Require all granted
</Directory>
ErrorLog /var/log/domain/`YOURfolder - domain.com`/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/domain/`YOURfolder - domain.com`/access.log combined
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment