Answer the question
In order to leave comments, you need to log in
How to add condition in apache and nginx?
It is now written:
<VirtualHost 222.222.222.222:8080>
ServerName site.ru
ServerAlias www.site.ru
DocumentRoot /home/user/web/site.ru/public_html/my/www
...
</VirtualHost>
server {
listen 222.222.222.222:80;
server_name site.ru www.site.ru;
error_log /var/log/apache2/domains/site.ru.error.log error;
location / {
proxy_pass http://222.222.222.222:8080;
location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|tif|tiff|css|js|htm|html|ttf|otf|webp|woff|txt|csv|rtf|doc|docx|xls|xlsx|ppt|pptx|odf|odp|ods|od$
root /home/user/web/site.ru/public_html/my/www;
access_log /var/log/apache2/domains/site.ru.log combined;
access_log /var/log/apache2/domains/site.ru.bytes bytes;
expires max;
try_files $uri @fallback;
}
}
...
Answer the question
In order to leave comments, you need to log in
According to Apache, I would do it not in the host settings, but by rewriting in .htaccess.
For nginx - via location:
location /catalog/ {
root /home/user/web/site.ru/public_html/my/xxx
....
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question