Setup Linux Web Server (CentOS)

https://hbayraktar.medium.com

Setup Linux Web Server

sudo apt-get install apache2
sudo apt-get install php libapache2-mod-php
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash –
sudo apt-get install nodejs
sudo systemctl enable vsftpd
sudo systemctl restart vsftpd
sudo systemctl restart apache2
sudo chmod -R 755 ./*

Apache2, change root directory

To change Apache's root directory, run: cd /etc/apache2/sites-available Then open the 000-default.conf file using the command: nano 000-default.conf Edit the DocumentRoot option: DocumentRoot /path/to/my/project Then restart the apache server: sudo service apache2 restart

Apache2 configuration

Show configuration apachectl -S
Add configuration file from conf-enabled sudo a2enconf nominatim

SSL configuration

/etc/apache2/default-ssl.conf
Set path to certificate files at SSLCertificateFile, SSLCertificateChainFile, SSLCertificateKeyFile

Error Log

/etc/var/apache2