Click here for "Error Codes for Commercial Air Conditioners".(Japanese Version)

Debian10.13 ; WEB Server Apache2

WEB Server Apache2

Allow http:80 and https:443 ports in UFW before installation

1. Apache2 Installation and Configuration

Install Apache2

2. Basic Apache2 Configuration

3. Apache2; Using Perl Scripts

Enable CGI to make Perl scripts availableEnable CGI to make Perl scripts available
①Perl install

②Enable CGI module and restart

③Confirm CGI module is enabled
Test Script Creation

Authorize script files

operation check

4 Apache2 : Using PHP Scripts

①PHP install

②Apache2 Configuration

③Create a PHP test page and check its operation

Access http:///index.php with a browser and if the following screen appears, OK

5. Virtual Host Settings

Copy the default configuration file (file name is arbitrary, in this case vhost.conf as an example) and configure the virtual host settings

Edit configuration file

Symbolic link to the configuration file to disable the default configuration file

Edit hosts file

directory creation

Create test pages and check operation

Access http:///index.html with a browser to check.

6. Digest authentication with Apache2

Since Basic Authentication, a well-known authentication authorization method for http, sends authentication information in plain text, there is a risk of ID and password leakage if the packet is intercepted.
On the other hand, Digest Authentication encrypts and transmits authentication information, so there is almost no risk of information leakage.

6.1 Create password file for Digest authentication

Specify an authenticated area called realm. This realm allows the same directory to be accessed as authenticated.
As an example, we will create a user named "secretuser" with "DigestAuth" as the realm. Execute the following command and enter the password for "secretuser" when prompted.

Confirmation

As above, secretuser and encrypted password are created

6.2 Edit Apache configuration file

Specify the directory to which Digest authentication will be applied. (In this case, specify the secret directory.)

Add the following at the end

Create a directory for Digest authentication

Enable Digest authentication and reboot

When accessing http://[FQDN]/secret with a browser, a screen will appear asking for "user name" and "password".

Copied title and URL