業務用エアコン関連の技術情報、エラーコード、環境問題対策に関する別サイト「エアコンの安全な修理・適切なフロン回収」

OpenSUSE16.0 : WEB Server (Apache) Install

1. Installation of the Apache Web Server

1.1 Install
1.2 Basic Settings
1.3 Enable Firewalld

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

1.4 Startup Verification

Create an HTML test page to verify functionality. Launch a web browser on the client PC and access the test page you created as shown below. If it loads successfully, that's fine.

Access http://[IP address] in your browser and verify the display as shown in the figure below.

2. Utilize Perl scripts

 Configure Perl scripts to be used as CGI.

2.1 Install Perl

①Install

②Enable the CGI module

CGI execution is permitted by default under [/srv/www/cgi-bin/].
Therefore, for example, creating and placing a script such as [/srv/www/cgi-bin/index.cgi] will make it accessible at [http://(httpd server)/cgi-bin/index.cgi]. Note that this configuration treats all files under [/srv/www/cgi-bin/] as CGI scripts, making non-CGI files inaccessible.
The following configuration allows CGI execution under /srv/www/cgi-bin/

Currently, the /srv/www/cgi-bin/ directory does not exist, so create it.

③Create test scripts and verify functionality

Grant permissions to the script file

Functionality Verification

If "Hello CGI" is displayed, it is functioning normally.

3.Virtual Host Configuration

Configure the virtual host settings as follows:
Domain [FQDN]
Directory /srv/www/htdocs/[FQDN]

Create a directory named [FQDN] under /srv/www/htdocs/

Create an index.html file in the [FQDN] directory.

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

Editing the hosts file

If you access "http://[FQDN]" in a web browser and see the display shown below, it's OK.

4. Using 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 verify functionality

Create a test page

Launch a web browser on the client PC and access "http://[FQDN]/info.php". If the test page you created appears as shown below, it is OK. (The PHP version may differ.)

Copied title and URL