Saturday, April 20, 2024

Installation of Apache Web Server

Install through yum:

[root@localhost ~]# yum -y install httpd mod_ssl
or
[root@localhost ~]# yum -y update httpd mod_ssl

Install through apt-get:

[root@localhost ~]# apt-get install apache2
Configuration:

If your Apache web server configuration directory is not /etc/httpd/, then it is necessary to copy /stats/vpnttg/etc/vpnttg.conf file to the appropriate folder.
For example in Debian or Ubuntu Linux distribution Apache web server configuration directory is /etc/apache2/

[root@localhost ~]# cp /stats/vpnttg/etc/vpnttg.conf /etc/apache2/sites-available/vpnttg.conf
Initialization:
[root@localhost ~]# chkconfig httpd on
or
[root@localhost ~]# systemctl enable httpd
or
[root@localhost ~]# a2enmod ssl
[root@localhost ~]# a2ensite default-ssl
[root@localhost ~]# a2enmod rewrite
[root@localhost ~]# a2enmod cgi
[root@localhost ~]# a2ensite vpnttg.conf

Restart the web server:

[root@localhost ~]# service httpd restart
or
[root@localhost ~]# systemctl restart httpd
or
[root@localhost ~]# service apache2 reload