BOOK THIS SPACE FOR AD
ARTICLE ADAnd we’re ready to start doing something 🎶
connecting to server
ssh root@.... //ssh connection option includes connection command for your own server name//Here you need to use the key pair you created previously as a password
sudo apt update && sudo apt upgrade -y
then we should install nginx
sudo apt install nginx -y
sudo systemctl start nginx
sudo systemctl enable nginx
sudo apt install php-fpm -y
sudo nano /etc/nginx/sites-available/default
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/html;
index index.php index.html index.htm index.nginx-debian.html;
<server_name> _; //you should change here !!
location / {
try_files $uri $uri/ =404;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock; # PHP versiyonunuzu kontrol edin
}
location ~ /\.ht {
deny all;
}
}
sudo systemctl restart nginx
In this way, we have completed all the necessary installations.
We complete all the processes by adding the codes of our website to the server.
cd /codesFile
sudo mv -f * /var/www/html
cd /var/www/html
systemctl status apache2 //just control. it should be 'enabled'
After completing all these processes, you can now visit your website using your open address.
This is how you can publish your own website
Thanks for reading.