Yazı Boyutu:

Hosting a website on Ubuntu machines without using a hosting control panel is entirely feasible and often preferred by advanced users seeking more control and customization. In this guide, we'll walk you through the process of setting up a website on Ubuntu step by step. Additionally, we'll discuss the benefits of purchasing VDS or VPS and highlight Eka Sunucu's Turkey-based VDS and VPS services throughout the article.

Setting Up a Website on Ubuntu:

  1. Installing Necessary Software:

    • Open the terminal and update the package lists by running:

       
      sudo apt update
    • Install Apache, PHP, and MySQL by running:
       
      sudo apt install apache2 php mysql-server php-mysql
  2. Configuring Apache:

    • Open the default Apache configuration file in a text editor by running:

       
      sudo nano /etc/apache2/sites-available/000-default.conf
    • Within the <VirtualHost> block, add the following lines:

       
      ServerName example.com ServerAlias www.example.com DocumentRoot /var/www/html
    • Save and exit the file.
  3. Uploading Site Files:

    • Upload your website files to the /var/www/html directory. Name your homepage index.html or index.php.
  4. Creating a Database:

    • Connect to MySQL as the root user by running:
       
      sudo mysql
    • Create a new database by running:

       
      CREATE DATABASE dbname;
    • Replace dbname with your desired database name.
  5. Creating a Database User and Granting Permissions:

    • Create a new user and grant privileges by running:

       
      CREATE USER 'username'@'localhost' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON dbname.* TO 'username'@'localhost'; FLUSH PRIVILEGES;
    • Replace username and password with your preferred username and password.
  6. Checking PHP Installation and Configuration:

    • Ensure PHP is correctly installed and configured by running:
       
      php -v

Purchasing VDS or VPS Guide:

Virtual Dedicated Servers (VDS) or Virtual Private Servers (VPS) offer users complete control and customization over their hosting environment. Some benefits of purchasing VDS or VPS include:

  • Faster access and high performance.
  • Local support and access to data centers in Turkey.
  • Data privacy and compliance with local regulations.
  • Improved SEO performance by using local servers.

Eka Sunucu provides reliable VDS and VPS services based in Turkey. With high-performance servers and 24/7 customer support, Eka Sunucu maximizes the speed and reliability of your website. Explore Turkey-based VDS or VPS options here.

Hosting a website on Ubuntu machines without a hosting control panel offers flexibility and control. By following the steps above, you can set up your website and consider opting for VDS or VPS services from a reliable provider like Eka Sunucu for enhanced performance and support.