scripts for sysadmin
generate and create file for virtual host
- params 1 : site name
- params 2 : url site
- params 3 : path to folder
exemple : ./generate_vhost.sh google google.fr /var/www/html/google/
## Apache2 + nodejs
1: sudo a2enmod proxy proxy_http
to the sites-available file :
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName www.domaine.fr
ServerAlias www.domaine.fr
ProxyRequests off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
<Location />
ProxyPass http://www.domaine.fr:3000/
ProxyPassReverse http://www.domaine.fr:3000/
</Location>
ErrorLog /var/log/apache2/general.log
CustomLog /var/log/apache2/access.log combined
</VirtualHost>