Hello, i've trying to get wordpress to run on FreeBSD 12.2-RELEASE and I'm getting this error on my web browser:
Here's what I've done:
(Installed the base system plus lib32)
Edited my host rc.conf and added:
Created /etc/jail.conf with these lines:
I started the jail:
Ran jls and I got this:
Installed apache24:
Then I tested it by entering my host IP address and confirmed that it was working, the page said that "It Works".
Installed mariadb:
Got this message:
Created a db called mysitedb and a user 'idude' and granted all the privileges.
Rechecked everything by running:
Everything was created
Installed PHP74:
# To check if it's running and got this:
Configured apache to use php module:
With this content:
Created a test php file:
#Added this code:
Tested on my web browser by entering:
Once again it worked.
Downloaded wordpress:
What am I missing here
Here's what I've done:
mkdir -p /jail/webserver/
bsdinstall jail /jail/webserver
(Installed the base system plus lib32)
Edited my host rc.conf and added:
Code:
jail_enable="YES"
jail_list="webserver"
Created /etc/jail.conf with these lines:
Code:
$jail_path="/jail";
path="$jail_path/$name";
mount.devfs;
exec.clean;
ip4=inherit;
ip6=inherit;
exec.start="sh /etc/rc";
exec.stop="sh /etc/rc.shutdown";
webserver {}
service jail start webserver
Ran jls and I got this:
Code:
JID IP Address Hostname Path
1 /jail/webserver
Installed apache24:
Code:
pkg -j webserver install apache24
sysrc -j webserver apache24_enable="YES"
jexec webserver service apache24 start
Then I tested it by entering my host IP address and confirmed that it was working, the page said that "It Works".
Installed mariadb:
Code:
pkg -j webserver install mariadb105-server
sysrc -j webserver mysql_enable="YES"
jexec webserver service mysql-server start
Checked if mysql was running:
jexec webserver service mysql-server status
mysql is running as pid 1097.
Code:
jexec webserver mysql_secure_installation # Set up my root pass
jexec webserver mysql -u root -p
Code:
CREATE DATABASE mysitedb;
CREATE USER idude@localhost IDENTIFIED BY 'mypass';
GRANT ALL PRIVILEGES ON mysitedb.* TO 'idude'@'localhost';
Rechecked everything by running:
Code:
SHOW DATABASES;
SELECT user FROM mysql.user;
Everything was created
Installed PHP74:
Code:
pkg -j webserver install -y php74 php74-mysqli mod_php74
jexec webserver cp /usr/local/etc/php.ini-production /usr/local/etc/php.ini
sysrc -j webserver php_fpm_enable="YES"
jexec webserver service php-fpm start
jexec webserver service php-fpm status
# php_fpm is running as pid 965.
Configured apache to use php module:
jexec webserver ee /usr/local/etc/apache24/modules.d/001_mod-php.conf
With this content:
Code:
<IfModule dir_module>
DirectoryIndex index.php index.html
<FilesMatch "\.php$">
SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch "\.phps$">
SetHandler application/x-httpd-php-source
</FilesMatch>
</IfModule>
jexec webserver ee /usr/local/www/apache24/data/info.php
#Added this code:
Code:
<?php phpinfo(); ?>
10.0.2.15/info.php
Once again it worked.
Downloaded wordpress:
Code:
jexec webserver cd /tmp
jexec webserver fetch http://wordpress.org/latest.tar.gz
jexec webserver tar xvf latest.tar.gz
jexec webserver mv wordpress mysite #Renamed wordpress to the name of mysite
jexec webserver mv -v mysite /usr/local/www/apache24/data/
jexec webserver chown -R www:www /usr/local/www/apache24/data/
What am I missing here
Last edited by a moderator: