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

FreeBSD14.3 : WEB Server(Apache2) , MySQL8

1. Apache2

1.1 Install

1.2 apache24 - setting

①extra/httpd-default.conf editing

➁httpd.conf editing

1.3 Start apache

Enable automatic apache startup

Scripts for startup and shutdown are located in /usr/local/etc/rc.d/apache24

Check the configuration file
If the description is correct, "Syntax OK" is printed.

Apache start

If you access the server from the client (http://server IP address [or domain name]) and see the following, it is normal.

1.4 Virtual Host Settings

document root: /usr/local/www/apache24/data/[FQDN]/
dpmain : [FQDN]
Set up virtual hosts

Create new bsd-vhost.conf under /usr/local/etc/apache24/extra

directory creation

Apache restart

1.5 apache24 - Running cgi

Checking Installation Options
Check the installation options with the following commands.
(portupgrade must be installed in advance to use portversion)

If it is not installed, install it with the following command

httpd.conf editing

Apache restart

2. MySQL Install

Install MySQL before installing PHP

Check version

Enable and start MySQL

MySQL Startup Confirmation

Running Security Scripts

To log in to the mysql server afterwards
mysql -u root -p
Enter password: Password set above

3. apache24 - PHP 8.3

3.1 PHP Install

3.2 php83-extensions Install

3.3 mod_php83 Install

3.4 PHP - initialization

①Configuration file "php.ini" setting

➁httpd.conf editing

Apache Configuration Check
If "Syntax OK" is displayed, it is normal.

Apache restart

3.5 PHP operation check

Create "info.php" in the document root of the web server

If you access "http://[FQDN]/info.php" with a browser and see the following, it is OK

Copied title and URL