Giter Site home page Giter Site logo

alkhaled-family's Introduction

Deploy this Website from GitHub Repo on Ubuntu + Nginx

  1. Install Nginx

    Open the terminal and run the following commands:

    sudo apt update
    sudo apt install nginx
  2. Clone the GitHub Repository

    Clone the GitHub repository containing your website:

    git clone https://github.com/abdelhak-zaaim/www.alkhaledfamily.com.git
  3. Move Website Files

    Move the website files (HTML, CSS, JavaScript, and any other assets) to the appropriate location:

    sudo mv your-repo/* /var/www/html
  4. Set Ownership and Permissions

    Set the correct ownership and permissions for the website directory:

    sudo chown -R www-data:www-data /var/www/html
    sudo chmod -R 755 /var/www/html
  5. Configure Nginx

    Open the default Nginx configuration file:

    sudo nano /etc/nginx/sites-available/default

    Inside the file, replace the server block with the following configuration:

    server {
        listen 80;
        listen [::]:80;
    
    root /var/www/html;
    index index.html index.htm;
    
    server_name your_domain.com;
    
    location / {
        try_files $uri $uri/ =404;
    }
    

    }

    Replace your_domain.com with your actual domain name or IP address.

  6. Test and Restart Nginx

    Test the Nginx configuration for any syntax errors:

    sudo nginx -t

    If everything is fine, you should see a "syntax is okay" message.

    Restart Nginx to apply the changes:

    sudo service nginx restart
  7. Access Your Website

    Your website should now be accessible through your domain name or IP address. Open a web browser and enter your domain name or IP address to see your website.

alkhaled-family's People

Contributors

abdelhak-zaaim avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.