Apache2 : Install2019/01/25 |
Install Apache2 to configure Web Server.
|
|
[1] | Install Apache2. |
www:~ # zypper -n install apache2
|
[2] | Configure Apache2. Replace server name to your own environment. |
www:~ #
vi /etc/sysconfig/apache2 # line 152: change to admin's email address APACHE_SERVERADMIN=" webmaster@srv.world "
# line 169: change to your hostname APACHE_SERVERNAME=" www.srv.world "
# line 248: change APACHE_SERVERTOKENS=" Prod "
www:~ #
vi /etc/apache2/httpd.conf # line 197: set file name that it can access only with directory's name DirectoryIndex index.html index.htm
systemctl start apache2 www:~ # systemctl enable apache2 |
[3] | If Firewalld is running, allow HTTP service. HTTP uses 80/TCP. |
www:~ # firewall-cmd --add-service=http --permanent success www:~ # firewall-cmd --reload success |
[4] | Create a HTML test page and access to it from client PC with web browser. It's OK if following page is shown. |
www:~ #
vi /srv/www/htdocs/index.html <html> <body> <div style="width: 100%; font-size: 40px; font-weight: bold; text-align: center;"> Test Page </div> </body> </html> |
Sponsored Link |