M
M
Maxim Kukushkin2020-06-30 04:52:50
Apache HTTP Server
Maxim Kukushkin, 2020-06-30 04:52:50

How to change the APACHE directory?

Hello! Installed a LAMP build on my Manjaro Linux. Question: how can I make apache work not with the /srv/http directory, but with another one - for example /home/user/work?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Antuan1979, 2020-06-30
@me4t10

1. Create a virtual host: /etc/apache2/sites-available create a file or edit the template 000-default.conf
2. Specify the path to the desired folder, for example: "DocumentRoot /home/user/work"
3. Enable the site: a2ensite 000- default.conf
4. Reload Apache: systemctl reload apache2.service
5. Try it in a browser!

V
Viktor Taran, 2020-06-30
@shambler81

1. if you are making a web server, then LAMP is not quite what you need; there is no admin panel in it, which is inconvenient for administration.
2. Why do you need to change the directory?
3. You can just make a symbolic link.
4 Change configs, but again, if you don't know how to do it, you'd better put the admin panel.
Bitrix VM options
- console admin panel pres 1 pres 2 pres 3 etc, console but convenient, installed with 1 script or on any vm
Vestacp - installed in 1 click
Brainycp - installed in 1 click ispconfig3 -
nifiga not installed in 1 click but I use it , but if you can install it, you won't ask such questions ;)
webmin - I think there is a web server there too. can be installed from the repository
The answer to your question lies in the /etc/apache2 or /etc/httpd folder, find the configs in which the DocumentRoot "/srv/http" is registered and change it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question