OLS httpd-vhosts.conf

gate2vn

Verified User
Joined
Nov 9, 2004
Messages
519
Location
Oslo
Do we still need that file? The file content is
virtualHost hostname {...}

hostname here is a string, not a variable, so it doesn't take any value. Then it creates extra error information in error_log like

2025-12-08 02:51:03.169528 [ERROR] [3443871] Hostname [*] on listener [my-real-ip:80] is mapped to virtual host [my-real-ip], can't map to virtual host [hostname]!
2025-12-08 02:51:03.169591 [ERROR] [3443871] Hostname [*] on listener [my-real-ip:443] is mapped to virtual host [my-real-ip], can't map to virtual host [hostname]!

Any time OLS reloads or restarts, it creates those lines in error_log. From my understanding, that file doesn't do anything with that content. Or should we change hostname to |HOSTNAME| token, so it can take the value of the server name?
 
You sure that you do not have CUSTOM file like this:

/usr/local/directadmin/custombuild/custom/openlitespeed/conf/httpd-vhosts.conf


with old paths to OLS configs ?
Because there were changes related to OLS in DA version 1.690:

 
I am aware of the change, but it's not a reason. Test yourself with a fresh OLS installation, then check error_log, you will see the error I mentioned above, even though it doesn't effect OLS. In fact, if you search with that error, in this forum only, you can see it's existing for a while.

I personally have noticed that for a while, but again, it doesn't effect to the working of OLS, so I ignore it. You can also search in the forum, many other users have the same error when running OLS in DA.
 
I see. Replicated and notified developers to check if that behavior can be improved. Thank you.
 
Back
Top