Installing Apache2
Apache is cross-platform server software that supports Linux, BSD, Mac OS, Microsoft Windows, Novell NetWare, BeOS.
Before installing Apache2, make sure nginx is not present on the server!
Installing Apache2
Enter the Apache2 installation command:
apt-get install apache2For centOS use the command yum install httpd (second name for Apache2)
Configuring Apache2
Go to sFTP at address /etc/apache2/sites-available and create a file server_name.conf (name can be anything), containing the following text with your data:
<VirtualHost *:80>
ServerName aeza.net # Specify the site domain
ServerAdmin admin@aeza.net # Your email
DocumentRoot /var/www/html # Path to the site folder
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>To start the site, enter the command:
a2ensite server_name.conf # specify the name of your site fileTo disable the site, use the following command:
a2dissite server_name.conf # specify the name of your site fileFor reload, use the following command:
service apache2 reloadConnecting PHP to Apache2
To use php files, install a special package:
apt-get install libapache2-mod-php -yReload Apache2:
service apache2 reloadEnabling rewrite (file rewriting)
Without this setting, a significant part of site CMS may not work.
Enter settings for the .htaccess file:
a2enmod rewriteReload Apache2:
service apache2 reloadEnabling SSL (encryption protocol)
Is an optional item that increases trust in your site
Enable the SSL encryption module:
a2enmod sslGo to sFTP at address /etc/apache2/sites-available and create a new config site_name-ssl.conf:
<VirtualHost *:443>
ServerName aeza.net # Specify the site domain
ServerAdmin admin@aeza.net # Your email
DocumentRoot /var/www/html # Path to the site folder
SSLEngine on
SSLCertificateFile /path/to/your_domain_name.pem # Path to the public certificate
SSLCertificateKeyFile /path/to/your_private.key # Path to the private certificate
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>Reload Apache2:
service apache2 reloadChecking for Nginx
When using Apache2 with Nginx, they will not be able to work correctly, conflicting for port - 80. Therefore, it is important to remove one of the web server software.
Check for Nginx:
service nginx statusIf you don't see a large message with information, then Nginx is not installed.
To remove Nginx, enter:
apt-get remove --purge nginx* -yRemoving Apache2
To remove Apache2, enter:
apt-get remove --purge apache2* -yDownloading files on Windows Server
Surely many have encountered the problem that the standard installed Internet Explorer browser on Windows Server does not allow downloading the desired file, let's fix it!
Installing Keitaro
Keitaro is an economical and flexible tracker with many features and tools, popular among webmasters and arbitrageurs.