Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

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

command to install Apache

$ 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

install apache di linux

# php 7.3 bisa diganti dengan versi yang kalian inginkan
sudo apt-get install -y libapache2-mod-php7.3 php7.3-cli php7.3-common php7.3-mbstring php7.3-gd php7.3-intl php7.3-xml php7.3-mysql php7.3-mcrypt php7.3-zip php7.3-dev

sudo apt-get install -y php7.3-mysql php7.3-opcache php7.3-pdo php7.3-xml php7.3-bcmath php7.3-bz2 php7.3-calendar php7.3-ctype php7.3-curl php7.3-dom php7.3-fileinfo php7.3-ftp

sudo apt-get install -y php7.3-gearman php7.3-gettext php7.3-iconv php7.3-igbinary php7.3-json php7.3-mailparse php7.3-mbstring php7.3-mcrypt php7.3-phar php7.3-posix php7.3-shmop php7.3-redis php7.3-simplexml php7.3-sockets php7.3-stomp

sudo apt-get install php7.3-sysvmsg php7.3-sysvsem php7.3-sysvshm php7.3-tokenizer php7.3-wddx php7.3-xmlreader php7.3-xmlwriter php7.3-xsl php7.3-zip
Comment

PREVIOUS NEXT
Code Example
Shell :: discord linux arch 
Shell :: git: delete branch in local and on remote 
Shell :: windows history command 
Shell :: linux decode base64 string 
Shell :: git view changes in commit 
Shell :: element function in terraform 
Shell :: checkout remote branch 
Shell :: docker install ubuntu 20 
Shell :: delete registry key powershell 
Shell :: set executable permissions linux 
Shell :: download calibre ubuntu 
Shell :: git clone specific branch 
Shell :: git remove all files in gitignore 
Shell :: move all files in a directory linux 
Shell :: shell script or condition 
Shell :: push local branch to remote github 
Shell :: how to check directory size in linux 
Shell :: git merge develop to feature 
Shell :: access wsl files from windows explorer 
Shell :: certbot nginx certonly 
Shell :: homebrew on mac 
Shell :: Invalid response body while trying to fetch 
Shell :: ubuntu install brave 
Shell :: check network card name linux 
Shell :: teamviewer raspberry pi command line 
Shell :: scp key 
Shell :: list user groups linux 
Shell :: run mongodb on desktop 
Shell :: adb screen record 
Shell :: install pytorch in jupyter notebook 
ADD CONTENT
Topic
Content
Source link
Name
8+7 =