Click here for "Safe Air Conditioner Repair and Proper Freon Recovery".(Japanese Version)

OpenSUSE15.3 ; Web server Apache Install

1. Install Web server Apache

1.1Install apache2

1.2 Apache2 : Basic Configuration

1.3 Enable Firewalld

The HTTP service must be allowed. Note that HTTP uses 80/TCP; HTTPS uses 443.

1.4 Apache2 : operation check

Create an HTML test page to verify that it works.
Start a web browser on the client PC and access the test page you created as follows

Access http://<IP address> with a browser and confirm that the following message is displayed.

2. Apache2 : Use Perl scripts.

Configure Perl scripts to be used as CGI

2.1 Install Perl

①Install

②Enable the CGI module.

CGI execution is allowed under [/srv/www/cgi-bin/] by default.
よって、For example, by creating and deploying the script [/srv/www/cgi-bin/index.cgi], you can access [http://(httpd server)/cgi-bin/index.cgi] Because this setting treats all files under [/srv/www/cgi-bin/] as CGI, non-CGI files cannot be displayed.
#The following configuration will allow CGI execution under /srv/www/cgi-bin/.

③Create a test script and check it works.

Grant permissions to script files.

operation check

If you see the message "Hello CGI", it is normal.

3. Apache2 : Virtual Host Configuration

Configure both domains sample1.korodes.com sample2.korodes.com to be displayed on a single server

Create a directory named sample1.korodes.com under /srv/www/htdocs/.

Create an idex.html file in the sample1.korodes.com directory

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

Edit the hosts file

Create a directory and index.html file for the domain "sample2.korodes.com" in the same way.

Add to virtual_host.conf file

Add to the hosts file

It is OK if "http://sample1.korodes.com" and "http://sample2.korodes.com" appear in your web browser as shown below.

4. Apache2 : Use PHP scripts

Install PHP and configure it so that PHP scripts can be used

4.1 Install PHP

4.2 Create a PHP test page and check it works.

Create a test page

Start a Web browser on the client PC and access "http://sample1.korodes.com/test.php". If the test page you created is displayed as shown below, you are good to go.

Copied title and URL