Last active
August 3, 2018 12:19
-
-
Save radheymkumar/265d8ee8eedee73aeb298fc5ef38284c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
How To Set Up Apache Virtual Hosts on Ubuntu : - | |
https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-14-04-lts | |
Step One — Create the Directory Structure | |
sudo mkdir -p /var/www/dev.drupal.com | |
sudo mkdir -p /var/www/dev.rwjf2.com | |
Step Two — Grant Permissions | |
sudo chmod -R 755 /var/www | |
Step Three — Create Demo Pages for Each Virtual Host | |
var/www/dev.rwjf2.com/index.php | |
Step Four — Create New Virtual Host Files | |
Create the First Virtual Host File | |
sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/dev.drupal.com.conf | |
Create the Second Virtual Host File | |
sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/dev.rwjf2.com.conf | |
Eg - cp 000-default.conf dev.rwjf2.com.conf | |
Edit - vi dev.rwjf.com.conf | |
press - i | |
ServerName dev.rwjf2.com | |
ServerAdmin radhe@radheshyam | |
DocumentRoot /var/www/html/dev.rwjf2.com | |
ESC , :wq | |
Step Five — Enable the New Virtual Host Files | |
sudo a2ensite dev.rwjf2.com.conf | |
sudo service apache2 restart | |
Step Six — Set Up Local Hosts File (Optional) | |
sudo vi /etc/hosts | |
press - i | |
192.168.4.7 dev.rwjf2.com | |
192.168.4.7 dev.drupal.com | |
ESC , :wq | |
Step Seven — Test your Results | |
http://dev.rwjf2.com | |
https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-14-04-lts | |
***************************************************************************************************************** | |
How to install full version of Vim in Ubuntu | |
vi --version // Show version | |
Remove vim-tiny which is the default installation package | |
sudo apt remove -y vim-tiny | |
Update package list. | |
sudo apt update | |
Install the full version of Vim. | |
sudo apt install -y vim | |
********************************************************************************************************************** | |
How To Set Up mod_rewrite for Apache on Ubuntu 14.04 | |
https://www.digitalocean.com/community/tutorials/how-to-set-up-mod_rewrite-for-apache-on-ubuntu-14-04 | |
Solve url Not found and query string issue | |
Step 1 — Installing Apache | |
sudo apt-get update | |
Step 2 — Enabling mod_rewrite | |
sudo a2enmod rewrite | |
sudo service apache2 restart | |
Step 3 — Setting Up .htaccess | |
sudo vi /etc/apache2/sites-enabled/000-default.conf | |
Add code | |
/etc/apache2/sites-available/default | |
<VirtualHost *:80> | |
<Directory /var/www/html> | |
. . . | |
</Directory> | |
. . . | |
</VirtualHost> | |
sudo service apache2 restart | |
sudo vi /var/www/html/.htaccess | |
/var/www/html/.htaccess | |
RewriteEngine on | |
sudo chmod 644 /var/www/html/.htaccess | |
************************************************************************************************************* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment