


Il Cluster è uno spazio dove vengono raggruppati argomenti, problematiche, soluzioni e gestione dell'Information Technology.
https://www.robadasmanettoni.it/forum/
Codice: Seleziona tutto
apt install apache2
systemctl enable apache2
Codice: Seleziona tutto
nano /var/www/html/index.html
Codice: Seleziona tutto
<html>
<head>
<title>It works!</title>
</head>
<body>
<h1>Hello, World!</h1>
</body>
</html>
Codice: Seleziona tutto
systemctl restart apache2
Codice: Seleziona tutto
mkdir -p /var/www/my_website.net/html
chown -R $USER:$USER /var/www/my_website.net/html
chmod 755 /var/www/my_website.net
Codice: Seleziona tutto
cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/my_website.net.conf
nano /etc/apache2/sites-available/my_website.net.conf
Codice: Seleziona tutto
<VirtualHost *:80>
ServerAdmin admin@my_website.net
ServerName my_website.net
ServerAlias www.my_website.net
DocumentRoot /var/www/my_website.net/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Codice: Seleziona tutto
a2ensite my_website.net.conf
a2dissite 000-default.conf
apache2ctl configtest
Codice: Seleziona tutto
systemctl restart apache2
Codice: Seleziona tutto
a2enmod ssl
Codice: Seleziona tutto
mkdir /etc/apache2/ssl
Codice: Seleziona tutto
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/apache2/ssl/apache.key -out /etc/apache2/ssl/apache.crt
Codice: Seleziona tutto
nano /etc/apache2/sites-available/default-ssl.conf
Codice: Seleziona tutto
a2ensite default-ssl.conf
Codice: Seleziona tutto
systemctl reload apache2
Codice: Seleziona tutto
apt install nginx
systemctl enable nginx
Codice: Seleziona tutto
<!DOCTYPE html>
<html>
<head>
<title>Hello, NGINX!</title>
<style type="text/css">
body {
font-family: Tahoma, Verdana, Arial, sans-serif;
width: 25em;
margin: 0 auto;
}
</style>
</head>
<body>
<h1>It works!</h1>
<p>Benvenuti nella pagina principale di questo sito web.</p>
<p>Visita il nostro sito web all'indirizzo
<a href="https://glitchiside.it/">www.glitchinside.it</a>.<br/>
<p><em>Grazie per utilizzare NGINX.</em></p>
</body>
</html>
Codice: Seleziona tutto
apt install mysql-server
Codice: Seleziona tutto
apt install php-fpm php-mysql
Codice: Seleziona tutto
nano /etc/nginx/sites-available/default
Codice: Seleziona tutto
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 _;
location / {
try_files $uri $uri/ =404;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
}
}
Codice: Seleziona tutto
systemctl restart nginx