Jump to content

All Activity

This stream auto-updates

  1. Last week
  2. Earlier
  3. Let's Encrypt is a certificate authority that provides free certificates in a fully automated process. In this guide, you will learn how to set up a TLS/SSL certificate from Let’s Encrypt on an Centos 7 / AlmaLinux 8 servers running Apache as a web server. Preparation Before enabling the Let's Encrypt certificate, make sure you have Apache Web Server installed on your server. If not, you can check out our Apache web server installation guide. You also need to create a virtual host configuration file by typing this command (if you didn't do it during Apache installation): vi /etc/httpd/conf.d/yourdomain.ltd.conf Add these lines to the configuration file: Please note. Make sure to change the "yourdomain.ltd" to your actual domain. After editing, you can save changes and exit. 1. Creating An Index.Html File For Testing To create an index.html file for testing, run this command: vi /var/www/html/index.html Enter the text for testing in the file: After that, you can save the file and exit. Now you need to change the owner of the ‘/var/www/html/index.html’ file to Apache by entering this command: chown -R apache:apache /var/www/html/index.html This means that Apache can now read this file. 2. Install Certbot On Centos 7 follow these steps to install Cerbot: We need to add the EPEL repository before installing Certbot. Run this command: yum install epel-release Install the Certbot: yum install certbot python2-certbot-apache mod_ssl On AlmaLinux 8 follow these steps to install Cerbot: Run this command to add the EPEL repository before installing Certbot: dnf install epel-release Install the Certbot: dnf install certbot python3-certbot-apache 3.Set Up The SSL Certificate To set up the SSL for domain, run this command: certbot --apache -d yourdomain.ltd You can install certificate for multiple domains and subdomains by following this command: certbot --apache -d yourdomain.ltd -d www.yourdomain.ltd -d yourdomain2.ltd -d subdomain.yourdomain2.ltd When issuing a certificate, you will need to provide an email, that you specified previously in virtual host configuration file (admin@yourdomain.ltd). You will also need to agree to the Terms of Service (mandatory) and agree or disagree to share your email address with Electronic Frontier Foundation (optional) Please note. When issuing a certificate, you may receive the following error message: Cancel the certificate issue process (enter 'c') and restart Apache service with the following command: systemctl restart httpd After that, try to issue the certificate again. 4.Check SSL Certificate Enter this command to check if SSL issued successfully: ls /etc/letsencrypt/live/yourdomain.ltd/ You should see the following output: cert.pem chain.pem fullchain.pem privkey.pem You can also check SSL in your browser. Open your website and click on the padlock icon in the address bar to see information about certificate. 5.Manual And Automatic Renewal Let’s Encrypt certificates are valid for 90 days. You can manually renew certificate with this command: certbot renew --dry-run If the certificate is less than 30 days away from expiration, this command will renew it. If you want to specify auto-renewal, you can edit the crontab and create cronjob to run the above command twice a day automatically: crontab -e Add this line to the crontab: You're all set. When necessary, certbot will renew your certificates and reload Apache to pick up the changes. Please note. If, after activating the certificate, your site is still not available and you receive "Secure Connection Failed" error, make sure to allow traffic via HTTPS (port 443), which could be blocked in firewalld by default. You can check if HTTPS enabled, using this command: firewall-cmd --list-all The output will provide you information about enabled services. In this screenshot, you can see that port 443 is enabled: If 443 port disabled, you can enable it with firewalld or iptables. To enable https service in firewalld, use this command: firewall-cmd --permanent --add-service=https Then reload the firewall: firewall-cmd --reload To enable https in iptables, use this command: iptables -I INPUT -p tcp -m tcp --dport 443 -j ACCEPT Then save the changes: iptables-save
  4. Introduction The Apache HTTP web server is currently the most popular web server software in the world. It is well suited for working with large projects and is very flexible in terms of configuration, which makes it possible to implement all the features of the hosted web resource. In this guide you will learn how to install Apache web server on RedHat based distributions (CentOS, AlmaLinux). Step For AlmaLinux 8 Only: Import GPG Key Repository This step is for AlmaLinux 8 only. Skip this step if you are installing Apache on CentOS 7. Run the following command to install updated GPG keys on AlmaLinux 8: rpm --import https://repo.almalinux.org/almalinux/RPM-GPG-KEY-AlmaLinux 1. Installing Apache Make sure your software is updated before the actual installation. You can do this with the following command: yum update After updating the packages, run the following command to install Apache: yum install httpd 2. Starting Apache To start Apache, run this command: systemctl start httpd 3. Apache Status Check To check Apache status, run the following command: systemctl status httpd The output will provide Apache and some additional information: You can also verify if Apache was enabled on your server, by entering your server's public IP address in your web browser: http://your_server_IP_address If everything is correct, you will see the default Apache web page (different for CentOS and AlmaLinux): CentOS: AlmaLinux: 4. Additional Configurations If you don't want Apache to start automatically on every system boot, run the following command: systemctl disable httpd If you want to re-enable this feature and automatically start Apache after every boot, run the following command: systemctl enable httpd To stop Apache, run this command: systemctl stop httpd You can restart Apache with: systemctl restart httpd To reload Apache without losing connections, enter the following command: systemctl reload httpd 5. Virtual Host (Optional) VirtualHost is a directive in the configuration file of the Apache web server, designed to match IP addresses available on the server, domains and directories on the server, as well as manage sites available on the server. You can create a virtual host configuration file by typing this command: vi /etc/httpd/conf.d/yourdomain.ltd.conf Add these lines to the configuration file: After editing, you can save changes and exit. Be sure to restart Apache after creating the configuration file: systemctl restart httpd To establish a secure connection, you can check our guide for Let's Encrypt.
  5. Introduction Joomla is a free and open source content management that uses a PHP and a backend database, such as MySQL. It offers a wide variety of features that make it an incredibly flexible content management system right out of the box. It was created in 2005 and is currently the 2nd most popular content management site online. Requirements Before working with Joomla, you need to have LAMP installed on your virtual server. If you don't have it you can find the tutorial for setting it up here. Once you have the user and required software, you can start installing Joomla! Update Server First things first. Like always, you should update your server before installing anything on your server: apt-get update 1. Download Joomla To start, create a directory where you will keep your Joomla files temporarily: mkdir temp Switch into the directory: cd temp Then you can go ahead and download the most recent version of Joomla straight from their website. You can find newest version on: https://www.joomla.org/download.html Currently, the latest version is 3.5.1. wget https://github.com/joomla/joomla-cms/releases/download/3.5.1/Joomla_3.5.1-Stable-Full_Package.zip This command will download the zipped Joomla package straight to your user's home directory on the virtual server. You can untar it with the following command, moving it straight into the default apache directory, /var/www : unzip Joomla_3.5.1-Stable-Full_Package.zip -d /var/www/html Do not forget to remove downloaded file: rm Joomla_3.5.1-Stable-Full_Package.zip We will need to change some folders permissions: chown -R www-data.www-data /var/www/html chmod -R 755 /var/www/html Restart apache: service apache2 restart 2. Create the Joomla Database and User Now we need to switch gears for a moment and create a new MySQL directory for Joomla. Go ahead and log into the MySQL Shell: mysql -u root -p Login using your MySQL root password. We then need to create the Joomla database, a user in that database, and give that user a new password. Keep in mind that all MySQL commands must end with semi-colon. First, let's make the database. Feel free to give it whatever name you choose: CREATE DATABASE joomla; Then we need to create the new user. You can replace the database, name, and password, with whatever you prefer: CREATE USER juser@localhost; Set the password for your new user: SET PASSWORD FOR juser@localhost= PASSWORD("password"); Finish up by granting all privileges to the new user. Without this command, the Joomla installer will be able to harness the new MySql user to create the required tables: GRANT ALL PRIVILEGES ON joomla.* TO juser@localhost IDENTIFIED BY 'password'; Then refresh MySQL: FLUSH PRIVILEGES; Exit out of the MySQL shell: exit Restart apache: service apache2 restart 3. Configuring Apache Create a new virtual host directive in Apache. For example, create a new Apache configuration file named ‘joomla.conf’ on your virtual server: sudo a2enmod rewrite touch /etc/apache2/sites-available/joomla.conf ln -s /etc/apache2/sites-available/joomla.conf /etc/apache2/sites-enabled/joomla.conf nano /etc/apache2/sites-available/joomla.conf Note: If nano is not installed on your server you can simple do it with command: apt-get install nano Add the following lines: <VirtualHost *:80> ServerAdmin admin@yourdomain.com DocumentRoot /var/www/html/ ServerName your-domain.com ServerAlias www.your-domain.com <Directory /var/www/html/> Options FollowSymLinks AllowOverride All Order allow,deny allow from all </Directory> ErrorLog /var/log/apache2/your-domain.com-error_log CustomLog /var/log/apache2/your-domain.com-access_log common </VirtualHost> Note: Do not forgot to change server's admin email address, domain and so on. Restart apache: service apache2 restart 4. Access the Joomla Installer Once you have placed the Joomla files in the correct location on your VPS, assigned the proper permissions, and set up the MySQL database and username, you can complete the remaining steps in your browser. Access the Joomla installer going to your domain name or IP address: http://IP_of_your_server
  6. Introduction A "LAMP" stack is a group of open source software that is typically installed together to enable a server to host dynamic websites and web apps. This term is actually an acronym which represents the Linux operating system, with the Apache web server. The site data is stored in a MySQL database, and dynamic content is processed by PHP. In this quick and easy guide, you will learn how to install and download LAMP on an Ubuntu 14.04 LTS server. Step 1: Install Apache The Apache web server is currently the most popular web server in the world, which makes it a great default choice for hosting a website. We can install Apache easily using Ubuntu's package manager, apt. A package manager allows us to install most software pain-free from a repository maintained by Ubuntu. You can learn more about how to use apt here. For our purposes, we can get started by typing these commands: sudo apt-get update sudo apt-get install apache2 -y Afterwards, your web server is installed. You can do a spot check right away to verify that everything went as planned by visiting your server's public IP address in your web browser: http://your_server_IP_address You will see the default Ubuntu 14.04 Apache web page, which is there for informational and testing purposes. Step 2: Install MySQL Now that we have our web server up and running, it is time to install MySQL. MySQL is a database management system. Basically, it will organize and provide access to databases where our site can store information. Again, we can use apt to acquire and install our software. This time, we'll also install some other "helper" packages that will assist us in getting our components to communicate with each other: sudo apt-get install mysql-server php5-mysql -y During the installation, your server will ask you to select and confirm a password for the MySQL "root" user. This is an administrative account in MySQL that has increased privileges. When the installation is complete, we need to run some additional commands to get our MySQL environment set up securely. First, we need to tell MySQL to create its database directory structure where it will store its information. You can do this by typing: sudo mysql_install_db Afterwards, we want to run a simple security script that will remove some dangerous defaults and lock down access to our database system a little bit. Start the interactive script by running: sudo mysql_secure_installation You will be asked to enter the password you set for the MySQL root account. Next, it will ask you if you want to change that password. If you are happy with your current password, type "n" for "no" at the prompt. For the rest of the questions, you should simply hit the "ENTER" key through each prompt to accept the default values. This will remove some sample users and databases, disable remote root logins, and load these new rules so that MySQL immediately respects the changes we have made. At this point, your database system is now set up and we can move on. Step 3: Install PHP PHP is the component of our setup that will process code to display dynamic content. It can run scripts, connect to our MySQL databases to get information, and hand the processed content over to our web server to display. We can once again leverage the apt system to install our components. We’re going to include some helper packages as well: sudo apt-get install php5 php5-mysql php-pear php5-gd php5-mcrypt php5-curl -y This should install PHP without any problems. We’ll test this in a moment. Step 4: Testing PHP5 In order to test PHP script you need to create simple PHP script in directory /var/www/html. in this case I’ll create phpinfo.php: sudo touch /var/www/html/phpinfo.php sudo apt-get install nano sudo nano /var/www/html/phpinfo.php Add the following line: <?php phpinfo(); ?> Save and exit ( Ctrl + O, Ctrl + X). Test the php script you have made from web browser by typing in address bar: http://ip_address/phpinfo.php This page basically gives you information about your server from the perspective of PHP. It is useful for debugging and to ensure that your settings are being applied correctly. At this point you are pretty much finished with the installation, you can begin testing out some webpages, scripts etc.
  7. Requrements Before working with phpMyAdmin you need to have LAMP installed on your server. If you don't have the Linux, Apache, MySQL, PHP stack on your server, you can find the tutorial for setting it up here. Install phpMyAdmin The easiest way to install phpMyAdmin is through apt-get: sudo apt-get install phpmyadmin apache2-utils During the installation, phpMyAdmin will walk you through a basic configuration. Once the process starts up, follow these steps: Select Apache2 for the server Choose YES when asked about whether to Configure the database for phpmyadmin with dbconfig-common Enter your MySQL password when prompted Enter the password that you want to use to log into phpmyadmin After the installation has completed, add phpMyAdmin to the Apache configuration. sudo nano /etc/apache2/apache2.conf Add folowing line: Include /etc/phpmyadmin/apache.conf Save and exit ( Ctrl + O, Ctrl + X). Restart Apache with command: sudo service apache2 restart You can then access phpMyAdmin by going to:
  8. Winter Sale: Up to 50% Off Linux and Windows VPS! 🔈Stay with LCwHost LTD on Winter Sale 🔥50% Discount for all VPS products 🔸Order your VPS now🔹 ✅Coupon: WINTERSALE23 Order Now: 👉 www.lcwhost.com ➖➖➖➖➖➖➖➖➖➖➖➖ LCwHost Ltd. is a leading cloud hosting service provider in the UK! Phone : +44 7865 236360 Email: hello@lcwhost.com Website: www.lcwhost.com
  9. DRAFT 1.mp4 Don’t miss out on our incredible BLACK FRIDAY sale with unbeatable discounts on all our VPS products. 🔈Stay with LCwHost LTD on Black Friday 🔥50% Discount for all VPS products ⌛️This discount is only active for 14 days, "24th–7th of December." 🔸Order your VPS now🔹 ✅Coupon: BLACKFRIDAY23 Order Now: 👉 www.lcwhost.com ➖➖➖➖➖➖➖➖➖➖➖➖ LCwHost LTD | is a leading cloud hosting service provider in the UK! Phone : +44 7865 236360 Email: hello@lcwhost.com Website: www.lcwhost.com
  1. Load more activity
×
×
  • Create New...