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

Ubuntu Server 18.04 : Web server and antivirus installed.

1. WEB server installation

1. 1 Apache2 installation

① Install

② Edit configuration file

Restart

1.2. Using Perl Scripts with Apache2

Enable CGI and configure it to use Perl scripts.
① Install Perl

② Enable the CGI module.

③ Test Script Creation

When the CGI module is enabled, the [/usr/lib/cgi-bin] directory will be allowed to execute CGI by default.
For example, by creating and deploying the script [/usr/lib/cgi-bin/index.cgi], you can access [http://(Apache2 server)/cgi-bin/index.cgi].
Note that this setting treats all files under [/usr/lib/cgi-bin] as CGI, so non-CGI files cannot be displayed.

# Test Script Creation

# operation check

1.3 Using PHP Scripts with Apache2

① Install PHP

② Configuring Apache2

③ Create a test page to see how it works.

http://[IP Address]/index.php

1.4 Virtual Host Configuration

① Preparing the configuration file
Copy the default configuration file and configure the virtual host settings(For example, let's say the file name is <vhost-sample.conf>.)

② Edit the configuration file

③ Activate the configuration file

Disable the default configuration file by putting a symbolic link to it

④ Restarting Apache

⑤ Edit the hosts file

2. Installed anti-virus software Clamaav

① Install
clamav related configuration files will be installed in /etc/clamav/ folder

② Update virus definitions

If you get the following error, change the log settings and run again.

ERROR: /var/log/clamav/freshclam.log is locked by another process
ERROR: Problem with internal logger (UpdateLogFile = /var/log/clamav/freshclam.log).

Change the log settings as follows

③ Edit configuration file

④ Automatic updating of virus definitions

Check if the service that automatically updates virus definitions is registered.

Logging will be done in /var/log/clamav/freshclam.log file

⑤ Run a virus check

⑥ Create a script file to do a full scan

Give the script file execute permission.
Create a virus quarantine folder
Run it.
Regularly run virus scans with cron
Copied title and URL