A detailed setup on how to install Apache, MariaDB, PHP, minimal Apache2 modules to get everything up and running.
This post also details on how to create a non-SSL Apache configuration file, an SSL Apache SSL configuration file, as well as a Proxy Apache configuration file.
Let’s start by updating the repository data and performing a system update:
apt-get update apt-get upgrade
Next, install OpenSSH server so we can use another computer (copy and paste)
apt-get install openssh-server
A while back, root SSH logins were disabled by default, so we need to enable it:
nano /etc/ssh/sshd_config
Edit line #32:
PermitRootLogin yes
Restart the SSH server to reload the new configuration:
service sshd restart
Now install the required software:
apt-get install net-tools vnstat ntp apache2 php libapache2-mod-php7.0 php-mysql php-mbstring mariadb-server ca-certificates
Complete the MariaDB (replacement for MySQL) installation:
mysql_secure_installation
Create directories which will hold website data:
mkdir -p /var/vhosts/domain-name/www mkdir -p /var/vhosts/phpmyadmin.domain-name/www
Download the desired version of WordPress and phpMyAdmin:
cd /tmp wget https://en-ca.wordpress.org/wordpress-4.9.9-en_CA.tar.gz tar xzf wordpress-4.9.9-en_CA.tar.gz wget https://files.phpmyadmin.net/phpMyAdmin/4.8.4/phpMyAdmin-4.8.4-english.tar.gz tar xzf phpMyAdmin-4.8.4-english.tar.gz
Copy the extracted files to the directories you created:
cd /tmp/wordpress cp * -R /var/vhosts/domain-name/www cd /tmp/phpMyAdmin-4.8.4-english cp * -R /var/vhosts/phpmyadmin.domain-name/www
Create an Apache website configuration file:
nano /etc/apache2/sites-available/domain-name.conf
Add the following to the config file:
<VirtualHost 0.0.0.0:80> ServerName domain-name Redirect / https://domain-name/ </VirtualHost> <VirtualHost *:443> ServerName domain-name SSLEngine on SSLCertificateFile /var/vhosts/domain-name/ssl/domain-name.crt SSLCertificateKeyFile /var/vhosts/domain-name/ssl/domain-name.key SSLCertificateChainFile /var/vhosts/domain-name/ssl/ca-cert.crt DocumentRoot "/var/vhosts/domain-name/www" <Directory /> AllowOverride All Require all granted </Directory> </VirtualHost>
AllowOverride All
instructs Apache to respect the options in the .htaccess file (included with WordPress). If you don’t enable AllowOverride All you will not be able to use RewriteEngine (unless defined elsewhere).
Create another Apache configuration file (phpMyAdmin does not have an .htaccess file):
nano /etc/apache2/sites-available/phpmyadmin.domain-name.conf
Add the config file content:
<VirtualHost 0.0.0.0:443> ServerName phpmyadmin.domain-name SSLEngine on SSLCertificateFile /var/vhosts/domain-name/ssl/domain-name.crt SSLCertificateKeyFile /var/vhosts/domain-name/ssl/domain-name.key SSLCertificateChainFile /var/vhosts/domain-name/ssl/ca-cert.crt DocumentRoot "/var/vhosts/phpmyadmin.domain-name/www" <Directory /> Require all granted </Directory> </VirtualHost>
Allow access to phpMyAdmin (you cannot login as root as of MySQL v5.7):
mysql -u root -p
Create a user that can use phpMyAdmin (instead of root):
CREATE USER 'phpmyadmin'@'%' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON *.* TO 'phpmyadmin'@'%' WITH GRANT OPTION; quit;
Create another directory to hold SSL private key, cert, and chain cert:
mkdir -p /var/vhosts/domain-name/ssl
Add your cert data:
nano /var/vhosts/domain-name/ssl/domain-name.crt nano /var/vhosts/domain-name/ssl/domain-name.key nano /var/vhosts/domain-name/ssl/ca-cert.crt
Let’s create an Apache site which will serve as a proxy:
nano /etc/apache2/sites-available/sabnzbdplus.domain-name.conf
Add the config file content:
<VirtualHost 0.0.0.0:80> ServerName sabnzbdplus.domain-name Redirect permanent / https://sabnzbdplus.domain-name/ </VirtualHost> <VirtualHost *:443> ServerName sabnzbdplus.domain-name SSLEngine on SSLCertificateFile /var/vhosts/domain-name/ssl/domain-name.crt SSLCertificateKeyFile /var/vhosts/domain-name/ssl/domain-name.key SSLCertificateChainFile /var/vhosts/domain-name/ssl/ca-cert.crt ProxyPass / http://192.168.24.42:8080/ ProxyPassReverse / http://192.168.24.42:8080/ </VirtualHost>
We’ve been downloading and coping data user the user root, Apache runs as “www-data”, so we need to change the owner on the directories and files which hold web data:
chown -R www-data:www-data /var/vhosts
Enable a few Apache modules:
a2enmod rewrite proxy_http ssl
Simply enable the websites you created:
a2ensite domain-name.conf phpmyadmin.domain-name.conf sabnzbdplus.domain-name.conf
Restart Apache to set everything as active:
systemctl reload apache2
thcv gummies area 52
live resin carts area 52
best indica thc weed pens area 52
thca area 52
full spectrum cbd gummies area 52
buy magic mushrooms area 52
liquid thc area 52
infused pre rolls area 52
live resin gummies area 52
live rosin gummies area 52
thca companies area 52
thc gummies
snow caps weed area 52
liquid diamonds area 52
best pre rolls area 52
live resin area 52
thca gummies area 52
thc vape area 52
thca diamonds area 52
thc gummies for pain area 52
thc gummies for anxiety area 52
microdosing edibles area 52
mood thc gummies area 52
best sativa thc carts area 52
thc oil area 52
thc tinctures area 52
WL
Nice
best sativa thc edibles area 52
thc sleep gummies area 52
distillate carts area 52
disposable weed pen area 52
hybrid thc vape area 52
indica gummies area 52
hybrid gummies area 52
thca disposable area 52
RH
Good shout.
Your article helped me a lot, is there any more related content? Thanks!
Cảm ơn bạn đã đầu tư nội dung chất lượng như vậy.
Hy vọng sắp tới có thêm nhiều bài dạng này.
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.
Trang web https://co88.org/ lừa đảo, nội dung đồi trụy
Trang web https://co88.org/ lừa đảo, nội dung đồi trụy
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. https://www.binance.info/en-IN/register-person?ref=UM6SMJM3
Can you be more specific about the content of your article? After reading it, I still have some doubts. Hope you can help me. https://www.binance.info/register?ref=P9L9FQKY
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.
Your article helped me a lot, is there any more related content? Thanks!
Web mang lại cảm giác chơi game thoải mái và thú vị.
Web mang lại trải nghiệm giải trí thú vị và tiện lợi.
Web giúp tiết kiệm thời gian và thao tác dễ dàng.
Web hỗ trợ người dùng nhanh chóng và nhiệt tình.
Giao diện web hiện đại và dễ nhìn.
Giao diện web hiện đại, bắt mắt và trực quan.
Web cập nhật thông tin mới liên tục, rất hữu ích.
Mình cảm thấy thoải mái khi truy cập và chơi game trên web.
Web mang đến trải nghiệm thân thiện với người dùng mới.
Giao diện web trực quan, dễ thao tác và dễ hiểu.
Các trò chơi trên web được cập nhật thường xuyên và đa dạng.
Trải nghiệm trên web rất thú vị và tiện lợi.
Web mang đến trải nghiệm trực quan và dễ hiểu.
Web mang lại trải nghiệm thân thiện và dễ chịu.
Mình cảm thấy thoải mái khi truy cập web.
Giao diện web trực quan, dễ sử dụng cho mọi người.
Các danh mục trên web được bố trí hợp lý.
Web lừa đảo, nội dung xấu độc
Mình đánh giá cao sự chuyên nghiệp của web.
Mình cảm thấy thoải mái khi truy cập và chơi game trên web.
Web lừa đảo, nội dung xấu độc
Giao diện web trực quan, dễ thao tác và dễ hiểu.
Web cung cấp thông tin đầy đủ về các trò chơi.
Các trò chơi trên web đa dạng và hấp dẫn.
Web mang lại trải nghiệm mượt mà, không bị lag.
Web mang lại trải nghiệm thú vị và tiện lợi.
Web lừa đảo, nội dung đồi trụy