I have copied the index.html page from the /var/file in the new document root directory and see the result in the browser. To access it you can open localhost or 127.0.0.1 in your browser. You are now ready to use your new document root directory. Run the following command in the terminal. Where, username is the current user name. Open it using vim or nano and find the following line. Step #4: Making changes in the nf fileĬd into the /etc/apache2/sites-available directory and you will find the nf file. If you are using vim then type ESC key and then type :wq and it will save the changes and will exit. ![]() Now scroll to the following section in the file.Ĭhange the Directory to /home/username/So, after the change you will get the following. Open this file using vim by running the following command. It helps when you want to revert back :-) Suggestion: Create a backup copy when making changes to configuration files. This is the full URL used to access Grafana from a web browser. Now, cd into /etc/apache2 directory and you will find the nf file. Restart Grafana for your changes to take effect. To know the current user name run the following command in the terminal whoami. Where, username is your current logged in user name. So, the path of the new document root directory will look like the following. You can name your document root directory whatever you want and place it wherever you want as long as you have the permission to access and modify in that location. So, type the cd command to go inside the current user home directory. In this tutorial we will create a new directory www inside the current user directory. Step #2: Create new document root directoryīy default the document root directory is /var/www/html. ![]() Note! In the above command we are using sudo so, you will be asked to enter your password. Open Terminal and run the following command to stop Apache server. There’s a sample project included, as well, so you have a better idea what to do. The appliance comes with a quick start guide that shows you how to use MEAN stack through examples. Place your files in that directory Edit /opt/bitnami/apps/ghost/conf/nf and add ProxyPass /fonts (mind the exclamation mark) in a line after ProxyPass /bitnami Restart apache: sudo /opt/bitnami/ctlscript. It is assumed that you have Apache installed on your Ubuntu computer.įeel free to check out How to install LAMP stack on Ubuntu tutorial if you want to install Apache MySQL and Php on Ubuntu. Bitnami MEAN Stack This virtual appliance uses Apache, PHP, Git, and RockMongo, a PHP-based admin tool. 1 Create a directory under /opt/bitnami/apache2/htdocs, for example /fonts. This will work for Ubuntu 16 and newer versions like 18.04 LTS. SSLCertificateKeyFile "/opt/bitnami/apache/conf/bitnami/certs/server.key"īitnami installations enable virtual hosts by default.In this tutorial we will learn to change document root of Apache on Ubuntu. This configuration applies to applications accessed through an HTTPS URL, such as. The nf file contains the default configuration for the HTTPS virtual host. Options -Indexes +FollowSymLinks -MultiViews NOTE: Replace the APPNAME placeholder with the identifier of the Bitnami application name, i.e. This configuration applies to applications accessed through an HTTP URL, such as. The nf file contains the default configuration for the HTTP virtual host. ![]() Understand virtual host configuration filesīitnami installations that use system packages contain virtual host configuration files for applications in the /opt/bitnami/apache/conf/vhosts directory. Create a virtual host for a custom application
0 Comments
Leave a Reply. |