phpservermon and Debian 9 (Stretch)

23 Jan

Let’s assume Proxmox:

apt-get install qemu-guest-agent openssh-server

Let’s prepare to install a newer version of PHP:

apt -y install lsb-release apt-transport-https ca-certificates
wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/php.list

Update the sources:

apt-get update

Now we can install:

apt-get install apache2 mysql-server libapache2-mod-php7.4 php7.4-common php7.4-curl php7.4-dev php7.4-gd php7.4-mbstring php7.4-xml php7.4-zip php7.4-mysql postfix

Let’s secure the database server:

mysql_secure_installation

Let’s create a database:

mysql -u root -p
CREATE USER 'phpmyadmin'@'%' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'phpmyadmin'@'%' WITH GRANT OPTION;
quit;

I prefer to have the site which runs phpMyAdmin is only accessible on another port:

nano /etc/apache2/ports.conf
Listen 8080

Create the directory the site source code will be located:

mkdir -p /var/vhosts/phpmyadmin/www

Download phpMyAdmin:

cd /tmp
wget https://files.phpmyadmin.net/phpMyAdmin/4.9.7/phpMyAdmin-4.9.7-english.tar.gz
tar xzf phpMyAdmin-4.9.7-english.tar.gz

We can then move it to the created folder:

cd phpMyAdmin-4.9.7-english
cp * -R /var/vhosts/phpmyadmin/www

Update Apache’s configuration:

nano /etc/apache2/sites-available/phpmyadmin.conf
<VirtualHost *:8080>
ServerName phpmyadmin
DocumentRoot "/var/vhosts/phpmyadmin/www"
<Directory />
Require all granted
</Directory>
</VirtualHost>

Assign proper permissions:

chown -R www-data:www-data /var/vhosts

Enable the site and restart the service:

a2ensite phpmyadmin
service apache2 restart

Create a user and database for phpservermon using phpMyAdmin.

http://ip-address:8080

Let’s create folders, download + extract, and move the source files for phpservermon:

mkdir -p /var/vhosts/website_name/www
mkdir -p /var/vhosts/website_name/ssl
cd /tmp
wget https://github.com/phpservermon/phpservermon/releases/download/v3.5.2/phpservermon-3.5.2.tar.gz
tar xzf phpservermon-3.5.2.tar.gz
cd phpservermon-3.5.2
cp * -R /var/vhosts/website_name/www

Update Apache’s server config:

nano /etc/apache2/sites-available/website_name.conf
<VirtualHost *:80>
ServerName website_name
Redirect / https://website_name/
</VirtualHost>
<VirtualHost *:443>
ServerName website_name
SSLEngine on
SSLCertificateFile /var/vhosts/website_name/ssl/certificate.crt
SSLCertificateKeyFile /var/vhosts/website_name/ssl/key.key
SSLCertificateChainFile /var/vhosts/website_name/ssl/ca-certificate.crt
DocumentRoot "/var/vhosts/website_name/www"
<Directory />
AllowOverride All
Require all granted
</Directory>
</VirtualHost>

Create your certificate assets:

nano /var/vhosts/website_name/ssl/key.key
nano /var/vhosts/website_name/ssl/certificate.crt
nano /var/vhosts/website_name/ssl/ca-certificate.crt

Enable the new site and the required SSL module:

a2ensite website_name
a2enmod ssl

Assign the proper owner and restart the service:

chown -R www-data:www-data /var/vhosts
service apache2 restart

34 thoughts on “phpservermon and Debian 9 (Stretch)

  1. Need top-notch roof installation in Lancaster? Roof Installation Pros delivers professional services with a skilled team ready to handle all roof types. Their work is reliable, durable, and adds value to your home—trusted by many for timely and budget-friendly roofing solutions.

  2. Get reliable roof installation services in Lancaster with Roof Installation Pros. Whether it’s a new roof or a replacement, their experienced crew delivers quality craftsmanship that lasts. Known for fair pricing and dependable results that boost home value—your roof is in safe hands.

  3. For dependable and expert roof installation services in Lancaster, Roof Installation Pros is your go-to choice. They specialize in all roofing types, delivering lasting solutions that safeguard your property and boost its value. Count on them for affordable, high-quality, and on-time service.

  4. When it comes to roof installation in Lancaster, Roof Installation Pros stands out for quality and reliability. Their expert team works with all roof types, delivering strong, protective installations that add value. Highly rated for affordable, on-time, and professional roofing work.

  5. When it comes to roof installation in Lancaster, Roof Installation Pros stands out for quality and reliability. Their expert team works with all roof types, delivering strong, protective installations that add value. Highly rated for affordable, on-time, and professional roofing work.

  6. Get reliable roof installation services in Lancaster with Roof Installation Pros. Whether it’s a new roof or a replacement, their experienced crew delivers quality craftsmanship that lasts. Known for fair pricing and dependable results that boost home value—your roof is in safe hands.

  7. Searching for trusted roof installation in Lancaster? Roof Installation Pros provides expert services across all roofing styles. Their experienced team guarantees strong, lasting installations that enhance your home’s protection and market value. Excellent service, always on time and within budget.

  8. I don’t think the title of your article matches the content lol. Just kidding, mainly because I had some doubts after reading the article.

  9. Hey! I’m at work surfing around your blog from my new iphone! Just wanted to say I love reading your blog and look forward to all your posts! Carry on the great work!

  10. Attractive section of content. I just stumbled upon your web site and in accession capital to assert that I acquire in fact enjoyed account your blog posts. Anyway I’ll be subscribing to your augment and even I achievement you access consistently quickly.

  11. You actually make it seem so easy together with yourpresentation however I in finding this matter to be actuallyone thing which I think I’d by no means understand.It kind of feels too complicated and extremely wide for me.I’m taking a look ahead for your next submit, I’ll attempt toget the hang of it!

  12. Hello! I could have sworn I’ve been to this site before but after browsing through a few of the articles I realized it’s new to me. Regardless, I’m certainly happy I found it and I’ll be bookmarking it and checking back often.

  13. ) سأعيد زيارتها مرة أخرى لأنني قمت بوضع علامة كتاب عليها. المال والحرية هي أفضل طريقة للتغيير، أتمنى أن تكون غنيًا و

  14. We have located sizeable proof of racial bias among the police and court docket staff in Ferguson. Theconfluence of policing to raise earnings and racialbias as a result has resulted in techniques thatnot only violate the Constitution and induce immediate damage to theindividuals whose rights are violated, but also undermine group trust, particularlyamong several African Americans. The male objected, citing his constitutional legal rights.The 2nd was regarding a clause in the will of Francis Jackson ofBoston, who left $5,000 and other house to the woman’s rights result in.When the gals show that they want to vote, Iam inclined to give them all the rights they want.This exhibit did for cop exhibits what “Get Smart” did for spy reveals.There is nevertheless a lot of function to be finished to get this to give regularly great success,but I assume it really is at the phase the place it could bevaluable to people, which is why I produced it.As of December 2014, more than 7 years later on, irrespective of originally owing a $151 fantastic and getting previously paid out $550, shenonetheless owed $541.

Leave a Reply

Your email address will not be published.