Answer the question
In order to leave comments, you need to log in
Why doesn't Apache open a site by domain?
I'm trying to make Nginx in the form of a reverse server so that it sends requests to Apache. Apache, on the other hand, to process the names that are accessed, and if such a Wirth. there is a host, I worked with it, and if not, I sent it to Wirth. host stub, i.e. (as an example):
test.domain.ru -> /any/www
projs.domain.ru -> /projs/www
Wirth config. Apache hosts:
<VirtualHost *:6080>
ServerAdmin [email protected]
DocumentRoot "/share/apache2/domains/any/www"
ErrorLog "/var/log/apache2/any-error.log"
CustomLog "/var/log/apache2/any-access.log" common
<Directory "/share/apache2/domains/any/www">
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Require all granted
</Directory>
</VirtualHost>
<VirtualHost projs.domain.ru:6080>
ServerAdmin [email protected]
ServerName projs.domain.ru
ServerAlias www.projs.domain.ru
DocumentRoot "/share/apache2/domains/projs/www"
ErrorLog "/var/log/apache2/projs-error.log"
CustomLog "/var/log/apache2/projs-access.log" common
<Directory "/share/apache2/domains/projs/www">
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Require all granted
</Directory>
</VirtualHost>
server {
listen 80;
location / {
proxy_pass http://localhost:6080;
proxy_store on;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question