How do I change the home directory in Apache?
How do I change the home directory in Apache?
8 Answers
- To change Apache’s root directory, run: cd /etc/apache2/sites-available.
- Then open the 000-default.conf file using the command: nano 000-default.conf.
- Edit the DocumentRoot option: DocumentRoot /path/to/my/project.
- Then restart the apache server: sudo service apache2 restart.
Where is Apache home directory on Linux?
1 Answer. The default document root for Apache is /var/www/ (before Ubuntu 14.04) or /var/www/html/ (Ubuntu 14.04 and later).
Where is my Apache root directory?
On a fresh installation of Apache, the document root is located at /var/www/html . If you’re working with an existing server, however, you may have a significantly different setup including multiple document roots in corresponding VirtualHost directives.
How do I change the root file in Apache Windows?
To confirm Apache installation, move to C:/Apache24/htdocs folder and locate the file index. html. Right-click to copy. Now move to c:/Websites folder (Document Root) and paste the file.
How do I change user in Apache?
Here are the steps to change Apache user and group.
- Open Apache Configuration File.
- Update User & Group.
- Change file ownership.
- Restart Apache Server.
- Test the changes.
How do I change my default Apache to CentOS?
This server is running CentOS, so you should find that file in the /etc/httpd/conf folder.
- I’m going to edit it with nano.
- Locate the DirectoryIndex section and remove index and any other unwanted filename (i.e. in this example index.
- Add in the one you require and save and exit, (press CTRL+X and Y to save).
- –
Where is httpd conf file?
If you installed httpd from source, the default location of the configuration files is /usr/local/apache2/conf . The default configuration file is usually called httpd. conf .
Where is httpd conf file in Windows?
Procedure
| Operating system | Path |
|---|---|
| Windows | C:\IBM HTTP Server\conf\httpd.conf |
| UNIX | /home/IBMHTTPD/conf/httpd.conf |