Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

reinstal apache2 ubuntu

sudo apt-get --purge remove apache2
sudo apt-get autoremove
sudo apt-get install apache2
sudo /etc/init.d/apache2 restart
Comment

install apache2 ubuntu

sudo apt update
sudo apt install apache2
Comment

ubuntu apache2 command

sudo systemctl start apache2
sudo systemctl stop apache2
sudo systemctl restart apache2
sudo systemctl status apache2
Comment

how to install apache server in ubuntu

sudo apt update
sudo apt install apache2
Comment

How to install Apache 2 in Ubuntu?

sudo apt-get --purge remove apache2
 
sudo apt-get autoremove
 
sudo apt-get install apache2
 
sudo /etc/init.d/apache2 restart
Comment

ubuntu install apache

sudo apt-get install apache2
sudo /etc/init.d/apache2 restart
Comment

Install Apache2 Linux

sudo apt install apache2 -y
Comment

install apache2

To install laravel v9 you will need apache2, php8 and composerv2 (Ubuntu 20.04/Ubuntu 18.04)
sudo apt update
sudo apt upgrade

Install and start apache2
sudo apt install apache2
sudo service apache2 start
Open: http://localhost:80
sudo service apache2 stop

Install php8
sudo add-apt-repository -y ppa:ondrej/php
sudo apt-get update
sudo apt-get install php8.0 php8.0-cli php8.0-common php8.0-xml php8.0-curl
php -v

Enable mods
sudo a2enmod php8.0
sudo a2enmod headers
sudo a2enmod rewrite

Install composerv2
cd /home/user
curl -sS https://getcomposer.org/installer -o composer-setup.php
sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer
compsoer -V

Install laravel project
composer create-project laravel/laravel example-app
php artisan key:generate --ansi
php artisan serve

Configuration file for apache2 example
cd /etc/apache2
sudo a2dissite 000-default.conf
cd /sites-available
sudo touch appName.conf

sudo nano appName.conf
Copy, paste and configurate:
---------------------------------------------------------------------------------
<VirtualHost *:80>
	ServerName name.local

    // If project is based on multiple env (admin/frontend)
	SetEnv ACTIVE_MODULE frontend
	
	DocumentRoot "pathDirectory/laravel/public"
	<Directory "pathDirectory/laravel/public">
	    Options Indexes FollowSymLinks MultiViews
	    AllowOverride All
	    Require all granted
	    Order allow,deny
	    Allow from all
	</Directory>

	ErrorLog /var/log/apache2/fileName.err
	CustomLog /var/log/apache2/fileName combined
</VirtualHost>
---------------------------------------------------------------------------------

sudo a2ensite appName.conf
sudo service apache2 restart
or
sudo service apache2 start
Comment

PREVIOUS NEXT
Code Example
Shell :: cannot connect to daemon at tcp:5037: Connection refused 
Shell :: all connections to the npm registry - including for package installation - must use TLS 1.2 or higher 
Shell :: github cancel last push 
Shell :: remove notebook kernel 
Shell :: install scikit-learn 
Shell :: powershell upgrade 
Shell :: ionic plugin list command 
Shell :: permission denied bash 
Shell :: how to install idle on ubuntu 20.04 
Shell :: install solidity compiler ubuntu 
Shell :: clean cache in linux 
Shell :: check which repo i am on git 
Shell :: list active services ubuntu 
Shell :: rancher docker reset password 
Shell :: set defualt branch to main git 
Shell :: sudo kill port 
Shell :: http-server npm 
Shell :: ssh key pair for github 
Shell :: conda install dask 
Shell :: install polybar ubuntu 20.04 
Shell :: bash grep only return first match 
Shell :: django fake initial migration 
Shell :: bash service list 
Shell :: php 7.4 all extensions 
Shell :: get files in directory bash 
Shell :: wsl unregister 
Shell :: fedora spotify 
Shell :: angular cli generate new module 
Shell :: git delete the most recent commit 
Shell :: pytesseract 
ADD CONTENT
Topic
Content
Source link
Name
7+3 =