Step1 : Update && upgrade package sudo apt-get update && upgrade Step 2: install apache2 sudo apt install apache2 Step3: Adjust the firewall to allow web traffic sudo ufw app list If you look at the Apache Full profile, it should show that it enables traffic to ports 80 and 443 : sudo ufw app info "Apache Full" Step4: Set up your location suppose path is /home/gulshan/Projects && url will be http://projects then for this set up *Disable the old config* sudo a2dissite 000-default.conf *Create new config with name projects.conf* *Add this to them* <VirtualHost *:80> ServerAdmin webmaster@projects ServerName projects ServerAlias projects DocumentRoot /home/gulshan/Projects <Directory /home/gulshan/Projects> Options Indexes FollowSymLinks AllowOverride all ...
Apache in MAC Mac has already apache and PHP installed we need to just enable them for Apache sudo apachectl start PHP cd /etc/apache2/ open httpd.conf find & uncomment this php LoadModule php7_module libexec/apache2/libphp7.so htaccess LoadModule rewrite_module libexec/apache2/mod_rewrite.so Enable your conf uncomment this # Virtual hosts Include /private/etc/apache2/extra/projects.conf create project.conf file in /etc/apache2/extra/projects.conf <VirtualHost *:80> ServerAdmin webmaster@projects.com DocumentRoot "/Users/gulshanprajapati/Projects" ServerName projects.com ServerAlias www.projects.com ErrorLog "/private/var/log/apache2/projects.com-error_log" CustomLog "/private/var/log/apache2/projects.com-access_log" common <Directory "/Users/gulshanprajapati/Projects" > AllowOverride All Options Indexes MultiViews FollowSymLinks Require all gra...
Comments
Post a Comment