Setup Ubuntu 20.04 Workspace

Apache

sudo apt -y install apache2 apachetop

Update apache /etc/apache2/envvar

export APACHE_RUN_USER=soulevil
export APACHE_RUN_GROUP=soulevil

Update apache /etc/apache2/sites-available/000-default.conf

<VirtualHost *:80>
	# The ServerName directive sets the request scheme, hostname and port that
	# the server uses to identify itself. This is used when creating
	# redirection URLs. In the context of virtual hosts, the ServerName
	# specifies what hostname must appear in the request's Host: header to
	# match this virtual host. For the default virtual host (this file) this
	# value is not decisive as it is used as a last resort host regardless.
	# However, you must set it for any further virtual host explicitly.
	ServerName localhost

	ServerAdmin webmaster@localhost
	DocumentRoot /home/soulevil/www/localhost

	<Directory /home/soulevil/www/localhost/>
		Options Indexes FollowSymLinks
		AllowOverride All
		Require all granted
	</Directory>

	# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
	# error, crit, alert, emerg.
	# It is also possible to configure the loglevel for particular
	# modules, e.g.
	#LogLevel info ssl:warn

	ErrorLog /home/soulevil/www/localhost/error.log
	CustomLog /home/soulevil/www/localhost/access.log combined

	# For most configuration files from conf-available/, which are
	# enabled or disabled at a global level, it is possible to
	# include a line for only one particular virtual host. For example the
	# following line enables the CGI configuration for this host only
	# after it has been globally disabled with "a2disconf".
	#Include conf-available/serve-cgi-bin.conf
</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

sudo /etc/init.d/apache2 restart

Nginx ( Will run on port 8080 with PHP-FPM )

sudo apt install nginx
sudo apt install php-fpm php-mysql
sudo nano /etc/nginx/sites-available/default
server {
    listen 80;
    server_name your_domain www.your_domain;
    root /var/www/your_domain;

    index index.html index.htm index.php;

    location / {
        try_files $uri $uri/ =404;
    }

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
     }

    location ~ /\.ht {
        deny all;
    }

}

Update phpmyadmin

/**
 MySQL password (only needed with 'config' auth_type)
 *
 @global string $cfg['Servers'][$i]['password']
 */
 $cfg['Servers'][$i]['password'] = ''; 

Pages: 1 2 3 4

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Blog at WordPress.com.

Up ↑

%d bloggers like this: