logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: httpd doesn't start with config file from network share
Author
zippe



Joined: 20 Aug 2024
Posts: 6

PostPosted: Tue 20 Aug '24 13:28    Post subject: httpd doesn't start with config file from network share Reply with quote

Problem: httpd.exe (2.4.62 64bit) doesn't start if config located on network smb share. (ex. \\server\folder\httpd.conf)


How to re-play: Get zip archive from the site. Use standard settings and add below a string with include

Code:
Include "//DESKTOP-C70CLDM/nomad/conf/test.conf"


Start httpd with command from local user.

Code:
PS C:\Apache24\bin> .\httpd.exe -e trace8


Code:
[Tue Aug 20 15:21:40.989362 2024] [so:debug] [pid 11532:tid 424] mod_so.c(266): AH01575: loaded module actions_module from C:/Apache24/modules/mod_actions.so
[Tue Aug 20 15:21:40.990361 2024] [so:debug] [pid 11532:tid 424] mod_so.c(266): AH01575: loaded module alias_module from C:/Apache24/modules/mod_alias.so
[Tue Aug 20 15:21:40.992360 2024] [so:debug] [pid 11532:tid 424] mod_so.c(266): AH01575: loaded module allowmethods_module from C:/Apache24/modules/mod_allowmethods.so
[Tue Aug 20 15:21:40.994357 2024] [so:debug] [pid 11532:tid 424] mod_so.c(266): AH01575: loaded module asis_module from C:/Apache24/modules/mod_asis.so
[Tue Aug 20 15:21:40.995369 2024] [so:debug] [pid 11532:tid 424] mod_so.c(266): AH01575: loaded module auth_basic_module from C:/Apache24/modules/mod_auth_basic.so
[Tue Aug 20 15:21:40.996363 2024] [so:debug] [pid 11532:tid 424] mod_so.c(266): AH01575: loaded module authn_core_module from C:/Apache24/modules/mod_authn_core.so
[Tue Aug 20 15:21:40.996363 2024] [so:debug] [pid 11532:tid 424] mod_so.c(266): AH01575: loaded module authn_file_module from C:/Apache24/modules/mod_authn_file.so
[Tue Aug 20 15:21:40.998365 2024] [so:debug] [pid 11532:tid 424] mod_so.c(266): AH01575: loaded module authz_core_module from C:/Apache24/modules/mod_authz_core.so
[Tue Aug 20 15:21:40.999360 2024] [so:debug] [pid 11532:tid 424] mod_so.c(266): AH01575: loaded module authz_groupfile_module from C:/Apache24/modules/mod_authz_groupfile.so
[Tue Aug 20 15:21:41.000368 2024] [so:debug] [pid 11532:tid 424] mod_so.c(266): AH01575: loaded module authz_host_module from C:/Apache24/modules/mod_authz_host.so
[Tue Aug 20 15:21:41.001372 2024] [so:debug] [pid 11532:tid 424] mod_so.c(266): AH01575: loaded module authz_user_module from C:/Apache24/modules/mod_authz_user.so
[Tue Aug 20 15:21:41.002361 2024] [so:debug] [pid 11532:tid 424] mod_so.c(266): AH01575: loaded module autoindex_module from C:/Apache24/modules/mod_autoindex.so
[Tue Aug 20 15:21:41.003371 2024] [so:debug] [pid 11532:tid 424] mod_so.c(266): AH01575: loaded module cgi_module from C:/Apache24/modules/mod_cgi.so
[Tue Aug 20 15:21:41.004365 2024] [so:debug] [pid 11532:tid 424] mod_so.c(266): AH01575: loaded module dir_module from C:/Apache24/modules/mod_dir.so
[Tue Aug 20 15:21:41.005361 2024] [so:debug] [pid 11532:tid 424] mod_so.c(266): AH01575: loaded module env_module from C:/Apache24/modules/mod_env.so
[Tue Aug 20 15:21:41.006366 2024] [so:debug] [pid 11532:tid 424] mod_so.c(266): AH01575: loaded module include_module from C:/Apache24/modules/mod_include.so
[Tue Aug 20 15:21:41.007368 2024] [so:debug] [pid 11532:tid 424] mod_so.c(266): AH01575: loaded module isapi_module from C:/Apache24/modules/mod_isapi.so
[Tue Aug 20 15:21:41.008365 2024] [so:debug] [pid 11532:tid 424] mod_so.c(266): AH01575: loaded module log_config_module from C:/Apache24/modules/mod_log_config.so
[Tue Aug 20 15:21:41.009367 2024] [so:debug] [pid 11532:tid 424] mod_so.c(266): AH01575: loaded module mime_module from C:/Apache24/modules/mod_mime.so
[Tue Aug 20 15:21:41.011399 2024] [so:debug] [pid 11532:tid 424] mod_so.c(266): AH01575: loaded module negotiation_module from C:/Apache24/modules/mod_negotiation.so
[Tue Aug 20 15:21:41.012387 2024] [so:debug] [pid 11532:tid 424] mod_so.c(266): AH01575: loaded module setenvif_module from C:/Apache24/modules/mod_setenvif.so
[Tue Aug 20 15:21:41.015387 2024] [core:error] [pid 11532:tid 424] (13)Permission denied: AH10504: ap_filepath_merge: UNC path //DESKTOP-C70CLDM/nomad/conf/test.conf not allowed by UNCList
httpd.exe: Syntax error on line 538 of C:/Apache24/conf/httpd.conf: Invalid Include path //DESKTOP-C70CLDM/nomad/conf/test.conf


Add UNCList directive to config before use this include

Code:
UNCList DESKTOP-C70CLDM


Code:
[Tue Aug 20 15:21:41.015387 2024] [core:error] [pid 11532:tid 424] (13)Permission denied: AH10504: ap_filepath_merge: UNC path //DESKTOP-C70CLDM/nomad/conf/test.conf not allowed by UNCList
httpd.exe: Syntax error on line 538 of C:/Apache24/conf/httpd.conf: Invalid Include path //DESKTOP-C70CLDM/nomad/conf/test.conf


Add UNCList with -C directive

Code:
.\httpd.exe -e trace8 -C "UNCList DESKTOP-C70CLDM"


Code:
[Tue Aug 20 15:22:01.171192 2024] [so:debug] [pid 4136:tid 476] mod_so.c(266): AH01575: loaded module actions_module from C:/Apache24/modules/mod_actions.so
[Tue Aug 20 15:22:01.172195 2024] [so:debug] [pid 4136:tid 476] mod_so.c(266): AH01575: loaded module alias_module from C:/Apache24/modules/mod_alias.so
[Tue Aug 20 15:22:01.173203 2024] [so:debug] [pid 4136:tid 476] mod_so.c(266): AH01575: loaded module allowmethods_module from C:/Apache24/modules/mod_allowmethods.so
[Tue Aug 20 15:22:01.174206 2024] [so:debug] [pid 4136:tid 476] mod_so.c(266): AH01575: loaded module asis_module from C:/Apache24/modules/mod_asis.so
[Tue Aug 20 15:22:01.175196 2024] [so:debug] [pid 4136:tid 476] mod_so.c(266): AH01575: loaded module auth_basic_module from C:/Apache24/modules/mod_auth_basic.so
[Tue Aug 20 15:22:01.175196 2024] [so:debug] [pid 4136:tid 476] mod_so.c(266): AH01575: loaded module authn_core_module from C:/Apache24/modules/mod_authn_core.so
[Tue Aug 20 15:22:01.176195 2024] [so:debug] [pid 4136:tid 476] mod_so.c(266): AH01575: loaded module authn_file_module from C:/Apache24/modules/mod_authn_file.so
[Tue Aug 20 15:22:01.177198 2024] [so:debug] [pid 4136:tid 476] mod_so.c(266): AH01575: loaded module authz_core_module from C:/Apache24/modules/mod_authz_core.so
[Tue Aug 20 15:22:01.177198 2024] [so:debug] [pid 4136:tid 476] mod_so.c(266): AH01575: loaded module authz_groupfile_module from C:/Apache24/modules/mod_authz_groupfile.so
[Tue Aug 20 15:22:01.178197 2024] [so:debug] [pid 4136:tid 476] mod_so.c(266): AH01575: loaded module authz_host_module from C:/Apache24/modules/mod_authz_host.so
[Tue Aug 20 15:22:01.179194 2024] [so:debug] [pid 4136:tid 476] mod_so.c(266): AH01575: loaded module authz_user_module from C:/Apache24/modules/mod_authz_user.so
[Tue Aug 20 15:22:01.180193 2024] [so:debug] [pid 4136:tid 476] mod_so.c(266): AH01575: loaded module autoindex_module from C:/Apache24/modules/mod_autoindex.so
[Tue Aug 20 15:22:01.180193 2024] [so:debug] [pid 4136:tid 476] mod_so.c(266): AH01575: loaded module cgi_module from C:/Apache24/modules/mod_cgi.so
[Tue Aug 20 15:22:01.181203 2024] [so:debug] [pid 4136:tid 476] mod_so.c(266): AH01575: loaded module dir_module from C:/Apache24/modules/mod_dir.so
[Tue Aug 20 15:22:01.182192 2024] [so:debug] [pid 4136:tid 476] mod_so.c(266): AH01575: loaded module env_module from C:/Apache24/modules/mod_env.so
[Tue Aug 20 15:22:01.182192 2024] [so:debug] [pid 4136:tid 476] mod_so.c(266): AH01575: loaded module include_module from C:/Apache24/modules/mod_include.so
[Tue Aug 20 15:22:01.184201 2024] [so:debug] [pid 4136:tid 476] mod_so.c(266): AH01575: loaded module isapi_module from C:/Apache24/modules/mod_isapi.so
[Tue Aug 20 15:22:01.186194 2024] [so:debug] [pid 4136:tid 476] mod_so.c(266): AH01575: loaded module log_config_module from C:/Apache24/modules/mod_log_config.so
[Tue Aug 20 15:22:01.186194 2024] [so:debug] [pid 4136:tid 476] mod_so.c(266): AH01575: loaded module mime_module from C:/Apache24/modules/mod_mime.so
[Tue Aug 20 15:22:01.187195 2024] [so:debug] [pid 4136:tid 476] mod_so.c(266): AH01575: loaded module negotiation_module from C:/Apache24/modules/mod_negotiation.so
[Tue Aug 20 15:22:01.188195 2024] [so:debug] [pid 4136:tid 476] mod_so.c(266): AH01575: loaded module setenvif_module from C:/Apache24/modules/mod_setenvif.so
[Tue Aug 20 15:22:01.188195 2024] [core:error] [pid 4136:tid 476] (13)Permission denied: AH10504: ap_filepath_merge: UNC path //DESKTOP-C70CLDM/nomad/conf/test.conf not allowed by UNCList
httpd.exe: Syntax error on line 538 of C:/Apache24/conf/httpd.conf: Invalid Include path //DESKTOP-C70CLDM/nomad/conf/test.conf


Same errors on Windows Server 2019 and Windows Pro 10 systems

In the httpd 2.4.55 everything starts correct.
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3092
Location: Hilversum, NL, EU

PostPosted: Tue 20 Aug '24 14:37    Post subject: Reply with quote

Have a look at https://www.apachelounge.com/viewtopic.php?t=9267

Maybe there is a hint.
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3092
Location: Hilversum, NL, EU

PostPosted: Tue 20 Aug '24 17:14    Post subject: Reply with quote

Best is to report it on the dev mailing list.

https://httpd.apache.org/lists.html#http-dev
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7368
Location: Germany, Next to Hamburg

PostPosted: Tue 20 Aug '24 23:24    Post subject: Re: httpd doesn't start with config file from network share Reply with quote

That is not an apache problem, but the windows service account. It is not allowed by default to access network drives. Create a local user that is allowed to access the network drive and change the settings of the apache service account to that new account. Restart apache
Back to top
zippe



Joined: 20 Aug 2024
Posts: 6

PostPosted: Wed 21 Aug '24 6:43    Post subject: Reply with quote

Steffen wrote:
Have a look at https://www.apachelounge.com/viewtopic.php?t=9267

Maybe there is a hint.


Yes, I figured out this topic firstly, but I think it is a different kind.
Back to top
zippe



Joined: 20 Aug 2024
Posts: 6

PostPosted: Wed 21 Aug '24 6:45    Post subject: Reply with quote

Steffen wrote:
Best is to report it on the dev mailing list.

https://httpd.apache.org/lists.html#http-dev


Thank you so much. I send report
Back to top
zippe



Joined: 20 Aug 2024
Posts: 6

PostPosted: Wed 21 Aug '24 6:53    Post subject: Re: httpd doesn't start with config file from network share Reply with quote

James Blond wrote:
That is not an apache problem, but the windows service account. It is not allowed by default to access network drives. Create a local user that is allowed to access the network drive and change the settings of the apache service account to that new account. Restart apache


You are right, from service account it is not allowed, so I run httpd exactly from local user and test access to share from this user before.
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3092
Location: Hilversum, NL, EU

PostPosted: Wed 21 Aug '24 10:10    Post subject: Reply with quote

@zippe : Sure that the same config was working in 2.4.55 ?
Back to top
zippe



Joined: 20 Aug 2024
Posts: 6

PostPosted: Thu 22 Aug '24 6:59    Post subject: Reply with quote

Steffen wrote:
@zippe : Sure that the same config was working in 2.4.55 ?


Yeah, I have thousands running httpd.exe with config, which located on network shares.
Back to top
digkas



Joined: 22 Aug 2024
Posts: 2

PostPosted: Thu 22 Aug '24 10:30    Post subject: I confirm that I have the exact same problem. Reply with quote

zippe wrote:
Steffen wrote:
@zippe : Sure that the same config was working in 2.4.55 ?


Yeah, I have thousands running httpd.exe with config, which located on network shares.


I confirm that I have the exact same problem.
My config was also working fine in 2.4.57 and httpd.exe doesn't start after updating in 2.4.62
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3092
Location: Hilversum, NL, EU

PostPosted: Thu 22 Aug '24 11:22    Post subject: Reply with quote

Best is to report it on the dev mailing list.

https://httpd.apache.org/lists.html#http-dev

You can refer to this post.
Back to top
covener



Joined: 23 Nov 2008
Posts: 59

PostPosted: Mon 09 Sep '24 15:28    Post subject: Reply with quote

@Steffen can you share a build with the below patch? I am not sure why -C didn't work so my confidence is not too high.

Code:
Index: server/core.c
===================================================================
--- server/core.c (revision 1920530)
+++ server/core.c (working copy)
@@ -4801,7 +4801,7 @@ AP_INIT_TAKE1("FlushMaxPipelined", set_flush_max_p
   "Maximum number of pipelined responses (pending) above which they are "
   "flushed to the network"),
 #ifdef WIN32
-AP_INIT_TAKE_ARGV("UNCList", set_unc_list, NULL, RSRC_CONF,
+AP_INIT_TAKE_ARGV("UNCList", set_unc_list, NULL, RSRC_CONF|EXEC_ON_READ,
   "Controls what UNC hosts may be looked up"),
 #endif
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3092
Location: Hilversum, NL, EU

PostPosted: Mon 09 Sep '24 16:22    Post subject: Reply with quote

Please test

https://www.apachelounge.com/download/VS17/binaries/Apache2.4.62-core-P1-Win64.rar
Back to top
zippe



Joined: 20 Aug 2024
Posts: 6

PostPosted: Tue 10 Sep '24 8:22    Post subject: Reply with quote

Steffen wrote:
Please test

https://www.apachelounge.com/download/VS17/binaries/Apache2.4.62-core-P1-Win64.rar


I'v done test. It works in both cases:

1. When start httpd with local config (ex. c:\apache24\conf\httpd.conf) which include smb shares inside.
2. httpd.exe with -C directive

Code:
 httpd -f "//DESKTOP-C70CLDM/nomad/conf/httpd.conf" -C "UNCList DESKTOP-C70CLDM"
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3092
Location: Hilversum, NL, EU

PostPosted: Tue 10 Sep '24 9:33    Post subject: Reply with quote

Thanks for testing.

Updated bugzilla https://bz.apache.org/bugzilla/show_bug.cgi?id=69313
Back to top
digkas



Joined: 22 Aug 2024
Posts: 2

PostPosted: Tue 10 Sep '24 10:10    Post subject: Reply with quote

Steffen wrote:
Please test

https://www.apachelounge.com/download/VS17/binaries/Apache2.4.62-core-P1-Win64.rar


It works!!! Thank you for your efforts!!!
Back to top


Reply to topic   Topic: httpd doesn't start with config file from network share View previous topic :: View next topic
Post new topic   Forum Index -> Apache