V
V
Vitaly2018-07-25 12:20:50
Apache HTTP Server
Vitaly, 2018-07-25 12:20:50

Apache setup?

Good afternoon, I turn to apache experts. Is it possible to somehow configure apache so that I create a folder with the host name, put all the files there (well, in extreme cases, I edited /etc/hosts) and my site took off.
Here's how OpenServer does it on Windows. Created a directory with files, threw in the database, restarted the server and everything is ready

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Stalker_RED, 2018-07-25
@kat-vetal

<VirtualHost *:80>
    ServerAlias *.example.com
    VirtualDocumentRoot /var/www/%1/
</VirtualHost>

You can also run maradns, for example, and wrap the entire zone on the localhost *.local
. This is how maradns + nginx works for me.
I just create a new directory in the projects and it is immediately available athttp://myNewDirectory.local

S
Sergey, 2018-07-25
@gangstarcj

https://www.digitalocean.com/community/tutorials/a...
https://www.google.ru/search?q=apache+ubuntu&oq=ap...
Which of these do you not understand?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question