OpenSUSE15.6 ; WEB Server (Apache) Install

1.WEB Server (Apache)

1.1 apache2 Install

1.2 Apache2 :Basic Settings

1.3 Firewalld

HTTP service permission is required. Note that HTTP uses 80/TCP; HTTPS uses 443

1.4 Apache2 : operation check

Create an HTML test page to check the operation. Start a Web browser on the client PC and check if the test page you created can be accessed as follows

Access http://<IP address> with a browser and confirm that it is displayed as shown below.

2. Apache2 : Using Perl Scripts

 Configure Perl scripts to be used as CGI

2.1 Perl


Enable CGI module

CGI execution is permitted by default under [/srv/www/cgi-bin/].
For example, by creating and placing the script [/srv/www/cgi-bin/index.cgi], you can access [http://(httpd server)/cgi-bin/index.cgi].
This configuration treats all files under [/srv/www/cgi-bin/] as CGI, so files other than CGI cannot be displayed.

Create test scripts and check operation

Authorize script files

operation check

If "Hello CGI" is displayed, it is normal.

3. Apache2 : Virtual Host Settings

Configure both domains to be displayed on one server

Create a directory named under /srv/www/htdocs/

Create the idex.html file in the directory

Create a new virtual_host.conf under /etc/apache2/vhosts.d

Edit hosts file(Example. : server IP address :

Similarly, create a directory and index.html file for the domain ""

Add to virtual_host.conf file

Add to hosts file

It is OK if "" and "" are displayed in the web browser as shown below.

4. Apache2 : Using PHP Scripts

Install and configure PHP so that PHP scripts are available

4.1 PHP Install

4.2 Create a PHP test page and check its operation

Create test page

Start a Web browser on the client PC, access "", and if the test page you created is displayed as shown below, it is OK.(PHP version may be different)

Copied title and URL