Skip to content

Instantly share code, notes, and snippets.

@trecno
Created June 25, 2021 16:57
Show Gist options
  • Save trecno/655a497fce5e251de810e4ba5d873fce to your computer and use it in GitHub Desktop.
Save trecno/655a497fce5e251de810e4ba5d873fce to your computer and use it in GitHub Desktop.
Comandos para configurar un Servidor Web en Ubuntu
sudo apt update
sudo apt install apache2
sudo apt install mysql-server
sudo mysql_secure_installation
no
yes
no
yes
no
sudo mysql
mysql>exit;
sudo apt install php libapache2-mod-php php-mysql
php -v
sudo mkdir /var/www/trecnocloud
sudo chown -R $USER:$USER /var/www/trecnocloud
sudo nano /etc/apache2/sites-available/trecnocloud.conf
<VirtualHost *:80>
#ServerName tu-dominio
#ServerAlias www.tu-dominio
ServerAdmin webmaster@localhost
DocumentRoot /var/www/trecnocloud
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
sudo a2ensite trecnocloud
sudo a2dissite 000-default
sudo apache2ctl configtest
sudo systemctl reload apache2
sudo nano /var/www/trecnocloud/index.html
<html>
<head>
<title>TrecnoCloud</title>
</head>
<body>
<h1>Hola Mundo</h1>
<p>Esto es una prueba de TrecnoCloud</p>
</body>
</html>
sudo nano /var/www/trecnocloud/info.php
<?php
phpinfo();
@mails2
Copy link

mails2 commented Feb 18, 2024

ERROR is: Package 'mysql-server' has no installation candidate
sudo apt install mysql-server

CORRECT IS:
sudo apt install mariadb-server mariadb-client

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment