I’m facing this issue repeatedly. Can someone help identify and resolve the problem? Please refer to the screenshot below.
Here the command
Database server
ssh peter@stdb01
sudo yum install -y mariadb-server
sudo systemctl enable mariadb
sudo systemctl start mariadb
sudo mysql -u root -p
CREATE DATABASE kodekloud_db3;
CREATE USER ‘kodekloud_gem’@‘%’ IDENTIFIED BY ‘GyQkFRVNr3’;
GRANT ALL PRIVILEGES ON kodekloud_db3.* TO ‘kodekloud_gem’@‘%’;
FLUSH PRIVILEGES;
EXIT;
mysql -u kodekloud_gem -p # check
Three application servers
ssh tony@stapp01
ssh steve@stapp02
ssh banner@stapp03
sudo yum install -y httpd php php-mysqlnd php-fpm php-cli
sudo systemctl start httpd
sudo systemctl enable httpd
sudo yum install -y php-mysqlnd
sudo vi /etc/httpd/conf/httpd.conf
sudo systemctl restart httpd
sudo systemctl enable httpd
sudo systemctl status httpd
sudo yum install wget
cd /var/www/html
sudo wget https://wordpress.org/latest.tar.gz
sudo tar -xvzf latest.tar.gz
sudo mv wordpress/* .
sudo rm -rf wordpress
sudo rm latest.tar.gz
sudo cp wp-config-sample.php wp-config.php
sudo vi wp-config.php
define( ‘DB_NAME’, ‘kodekloud_db3’ );
define( ‘DB_USER’, ‘kodekloud_gem’ );
define( ‘DB_PASSWORD’, ‘GyQkFRVNr3’ );
define( ‘DB_HOST’, ‘stdb01.stratos.xfusioncorp.com’ );
sudo systemctl restart httpd
sudo systemctl enable httpd
sudo systemctl status httpd
Here httpd.conf file
ServerRoot “/etc/httpd”
Listen 5002
Include conf.modules.d/*.conf
User apache
Group apache
<VirtualHost *:5002>
DocumentRoot “/var/www/html”
ServerName stapp01.stratos.xfusioncorp.com # (Also, use here stapp02, stapp03)
# Ensure the directory permissions are correct
<Directory "/var/www/html">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
# ErrorLog and CustomLog for this virtual host (optional)
ErrorLog "/var/log/httpd/stapp01_error_log"
CustomLog "/var/log/httpd/stapp01_access_log" combined
ServerAdmin root@localhost
AllowOverride none Require all deniedDocumentRoot “/var/www/html”
<Directory “/var/www”>
AllowOverride None
# Allow open access:
Require all granted
<Directory “/var/www/html”>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
<Files “.ht*”>
Require all denied
ErrorLog “logs/error_log”
LogLevel warn
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%h %l %u %t \"%r\" %>s %b" common<IfModule logio_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
</IfModule>
CustomLog "logs/access_log" combined
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
<Directory “/var/www/cgi-bin”>
AllowOverride None
Options None
Require all granted
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
AddDefaultCharset UTF-8
MIMEMagicFile conf/magic
EnableSendfile on
IncludeOptional conf.d/*.conf