Converting from iis to Apache

Started by Docfxit, November 21, 2013, 08:16:47 PM

Previous topic - Next topic

Docfxit

I have an iis server that I would like to convert to Apache in Windows.

I have installed Httpd-2.4.6-x86 and I have successfully brought up the test page.
Because I am running asp on iis I installed mono-3.2.3-gtksharp-2.12.11-win32-0  I don't know how to test it.
When I installed Apache I put it into the default folder C:\Apache24.
My iis server root is in C:\MyDocuments2\Web
I made these changes to httpd.conf:
DocumentRoot "C:\MyDocuments2\Web"
<Directory "C:\MyDocuments2\Web">
<IfModule dir_module>
    DirectoryIndex index.html default.asp
</IfModule>

I stopped the server and re-started it.
I'm getting an error on my domain:
Forbidden
You don't have permission to access / on this server

The error.log shows:
[Thu Nov 21 10:39:24.625000 2013] [ssl:warn] [pid 5012:tid 468] AH01909: RSA certificate configured for localhost:443 does NOT include an ID which matches the server name
[Thu Nov 21 10:39:24.625000 2013] [ssl:warn] [pid 5012:tid 468] AH02292: Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Thu Nov 21 10:39:24.718750 2013] [ssl:warn] [pid 5012:tid 468] AH01909: RSA certificate configured for localhost:443 does NOT include an ID which matches the server name
[Thu Nov 21 10:39:24.718750 2013] [ssl:warn] [pid 5012:tid 468] AH02292: Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Thu Nov 21 10:39:24.718750 2013] [mpm_winnt:notice] [pid 5012:tid 468] AH00455: Apache/2.4.6 (Win32) OpenSSL/1.0.1e configured -- resuming normal operations
[Thu Nov 21 10:39:24.718750 2013] [mpm_winnt:notice] [pid 5012:tid 468] AH00456: Server built: Jul 15 2013 11:49:28
[Thu Nov 21 10:39:24.718750 2013] [core:notice] [pid 5012:tid 468] AH00094: Command line: 'C:\\Apache24\\bin\\httpd.exe -d C:/Apache24'
[Thu Nov 21 10:39:24.718750 2013] [mpm_winnt:notice] [pid 5012:tid 468] AH00418: Parent: Created child process 5116
[Thu Nov 21 10:39:25.359375 2013] [ssl:warn] [pid 5116:tid 1740] AH01909: RSA certificate configured for localhost:443 does NOT include an ID which matches the server name
[Thu Nov 21 10:39:25.359375 2013] [ssl:warn] [pid 5116:tid 1740] AH02292: Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Thu Nov 21 10:39:25.437500 2013] [ssl:warn] [pid 5116:tid 1740] AH01909: RSA certificate configured for localhost:443 does NOT include an ID which matches the server name
[Thu Nov 21 10:39:25.437500 2013] [ssl:warn] [pid 5116:tid 1740] AH02292: Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Thu Nov 21 10:39:25.437500 2013] [mpm_winnt:notice] [pid 5116:tid 1740] AH00354: Child: Starting 64 worker threads.
[Thu Nov 21 10:40:12.656250 2013] [authz_core:error] [pid 5116:tid 1180] [client 75.79.6.149:62936] AH01630: client denied by server configuration: C:/Apache24/htdocs/
[Thu Nov 21 10:47:13.234375 2013] [authz_core:error] [pid 5116:tid 1180] [client 85.17.141.182:42535] AH01630: client denied by server configuration: C:/Apache24/htdocs/proxychecker, referer: http://www.google.com/search?hl=ru&q=free+proxy+checker&sourceid=navclient-ff&ie=UTF-8
[Thu Nov 21 10:48:48.250000 2013] [mpm_winnt:warn] [pid 5116:tid 1092] (OS 64)The specified network name is no longer available.  : AH00341: winnt_accept: Asynchronous AcceptEx failed.
[Thu Nov 21 10:58:31.093750 2013] [mpm_winnt:warn] [pid 5116:tid 1092] (OS 64)The specified network name is no longer available.  : AH00341: winnt_accept: Asynchronous AcceptEx failed.
[Thu Nov 21 11:00:32.328125 2013] [authz_core:error] [pid 5116:tid 1180] [client 77.23.208.233:4696] AH01630: client denied by server configuration: C:/Apache24/htdocs/
[Thu Nov 21 11:00:32.656250 2013] [authz_core:error] [pid 5116:tid 1180] [client 77.23.208.233:4696] AH01630: client denied by server configuration: C:/Apache24/htdocs/favicon.ico
[Thu Nov 21 11:00:42.656250 2013] [authz_core:error] [pid 5116:tid 1180] [client 77.23.208.233:4697] AH01630: client denied by server configuration: C:/Apache24/htdocs/
[Thu Nov 21 11:00:42.968750 2013] [authz_core:error] [pid 5116:tid 1180] [client 77.23.208.233:4697] AH01630: client denied by server configuration: C:/Apache24/htdocs/favicon.ico
[Thu Nov 21 11:01:42.828125 2013] [mpm_winnt:warn] [pid 5116:tid 1092] (OS 64)The specified network name is no longer available.  : AH00341: winnt_accept: Asynchronous AcceptEx failed.
[Thu Nov 21 11:01:42.828125 2013] [mpm_winnt:warn] [pid 5116:tid 1084] (OS 64)The specified network name is no longer available.  : AH00341: winnt_accept: Asynchronous AcceptEx failed.
[Thu Nov 21 11:02:14.750000 2013] [mpm_winnt:warn] [pid 5116:tid 1084] (OS 64)The specified network name is no longer available.  : AH00341: winnt_accept: Asynchronous AcceptEx failed.
[Thu Nov 21 11:02:14.953125 2013] [mpm_winnt:warn] [pid 5116:tid 1092] (OS 64)The specified network name is no longer available.  : AH00341: winnt_accept: Asynchronous AcceptEx failed.
[Thu Nov 21 11:02:33.031250 2013] [authz_core:error] [pid 5116:tid 1180] [client 85.214.48.34:40564] AH01630: client denied by server configuration: C:/Apache24/htdocs/
[Thu Nov 21 11:02:40.265625 2013] [ssl:error] [pid 5116:tid 1180] AH02031: Hostname www.theoffice.la provided via SNI, but no hostname provided in HTTP request
[Thu Nov 21 11:11:26.796875 2013] [authz_core:error] [pid 5116:tid 1180] [client 220.181.108.178:21542] AH01630: client denied by server configuration: C:/Apache24/htdocs/

Does anyone know what do I need to configure to make this work?  Or should I post this question on a different forum?

Thank you,

Docfxit


Gregg

For these:
[Thu Nov 21 10:48:48.250000 2013] [mpm_winnt:warn] [pid 5116:tid 1092] (OS 64)The specified network name is no longer available.  : AH00341: winnt_accept: Asynchronous AcceptEx failed.
[Thu Nov 21 10:58:31.093750 2013] [mpm_winnt:warn] [pid 5116:tid 1092] (OS 64)The specified network name is no longer available.  : AH00341: winnt_accept: Asynchronous AcceptEx failed.

Add:
AcceptFilter http none
AcceptFilter https none

For the forbiddens:
Did you restart the server after changing the DocumentRoot? It seems to still be looking in C:/Apache24/htdocs/


Docfxit

Thank you for the reply...

I have made the changes:
AcceptFilter http none
AcceptFilter https none

I have restarted the server.  And just in case I restarted the computer.

I am now getting an error:
Forbidden
You don't have permission to access / on this server


The error.log shows:
[Thu Nov 21 11:49:15.125000 2013] [ssl:warn] [pid 3872:tid 468] AH01909: RSA certificate configured for localhost:443 does NOT include an ID which matches the server name
[Thu Nov 21 11:49:15.125000 2013] [ssl:warn] [pid 3872:tid 468] AH02292: Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Thu Nov 21 11:49:15.218750 2013] [ssl:warn] [pid 3872:tid 468] AH01909: RSA certificate configured for localhost:443 does NOT include an ID which matches the server name
[Thu Nov 21 11:49:15.218750 2013] [ssl:warn] [pid 3872:tid 468] AH02292: Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Thu Nov 21 11:49:15.218750 2013] [mpm_winnt:notice] [pid 3872:tid 468] AH00455: Apache/2.4.6 (Win32) OpenSSL/1.0.1e configured -- resuming normal operations
[Thu Nov 21 11:49:15.218750 2013] [mpm_winnt:notice] [pid 3872:tid 468] AH00456: Server built: Jul 15 2013 11:49:28
[Thu Nov 21 11:49:15.218750 2013] [core:notice] [pid 3872:tid 468] AH00094: Command line: 'C:\\Apache24\\bin\\httpd.exe -d C:/Apache24'
[Thu Nov 21 11:49:15.218750 2013] [mpm_winnt:notice] [pid 3872:tid 468] AH00418: Parent: Created child process 5076
[Thu Nov 21 11:49:15.921875 2013] [ssl:warn] [pid 5076:tid 1740] AH01909: RSA certificate configured for localhost:443 does NOT include an ID which matches the server name
[Thu Nov 21 11:49:15.921875 2013] [ssl:warn] [pid 5076:tid 1740] AH02292: Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Thu Nov 21 11:49:16.078125 2013] [ssl:warn] [pid 5076:tid 1740] AH01909: RSA certificate configured for localhost:443 does NOT include an ID which matches the server name
[Thu Nov 21 11:49:16.078125 2013] [ssl:warn] [pid 5076:tid 1740] AH02292: Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Thu Nov 21 11:49:16.078125 2013] [mpm_winnt:notice] [pid 5076:tid 1740] AH00354: Child: Starting 64 worker threads.
[Thu Nov 21 11:49:36.515625 2013] [authz_core:error] [pid 5076:tid 1176] [client 75.79.6.149:46632] AH01630: client denied by server configuration: C:/Apache24/htdocs/
[Thu Nov 21 11:49:48.984375 2013] [authz_core:error] [pid 5076:tid 1176] [client 75.79.6.149:49232] AH01630: client denied by server configuration: C:/Apache24/htdocs/
[Thu Nov 21 11:52:04.281250 2013] [mpm_winnt:notice] [pid 3872:tid 468] AH00422: Parent: Received shutdown signal -- Shutting down the server.
[Thu Nov 21 11:52:06.280625 2013] [mpm_winnt:notice] [pid 5076:tid 1740] AH00364: Child: All worker threads have exited.
[Thu Nov 21 11:52:06.296250 2013] [mpm_winnt:notice] [pid 3872:tid 468] AH00430: Parent: Child process 5076 exited successfully.
[Thu Nov 21 11:53:30.640625 2013] [ssl:warn] [pid 2256:tid 424] AH01909: RSA certificate configured for localhost:443 does NOT include an ID which matches the server name
[Thu Nov 21 11:53:30.640625 2013] [ssl:warn] [pid 2256:tid 424] AH02292: Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Thu Nov 21 11:53:30.765625 2013] [ssl:warn] [pid 2256:tid 424] AH01909: RSA certificate configured for localhost:443 does NOT include an ID which matches the server name
[Thu Nov 21 11:53:30.765625 2013] [ssl:warn] [pid 2256:tid 424] AH02292: Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Thu Nov 21 11:53:30.765625 2013] [mpm_winnt:notice] [pid 2256:tid 424] AH00455: Apache/2.4.6 (Win32) OpenSSL/1.0.1e configured -- resuming normal operations
[Thu Nov 21 11:53:30.765625 2013] [mpm_winnt:notice] [pid 2256:tid 424] AH00456: Server built: Jul 15 2013 11:49:28
[Thu Nov 21 11:53:30.765625 2013] [core:notice] [pid 2256:tid 424] AH00094: Command line: 'C:\\Apache24\\bin\\httpd.exe -d C:/Apache24'
[Thu Nov 21 11:53:30.765625 2013] [mpm_winnt:notice] [pid 2256:tid 424] AH00418: Parent: Created child process 3940
[Thu Nov 21 11:53:31.406250 2013] [ssl:warn] [pid 3940:tid 1740] AH01909: RSA certificate configured for localhost:443 does NOT include an ID which matches the server name
[Thu Nov 21 11:53:31.406250 2013] [ssl:warn] [pid 3940:tid 1740] AH02292: Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Thu Nov 21 11:53:31.500000 2013] [ssl:warn] [pid 3940:tid 1740] AH01909: RSA certificate configured for localhost:443 does NOT include an ID which matches the server name
[Thu Nov 21 11:53:31.500000 2013] [ssl:warn] [pid 3940:tid 1740] AH02292: Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Thu Nov 21 11:53:31.500000 2013] [mpm_winnt:notice] [pid 3940:tid 1740] AH00354: Child: Starting 64 worker threads.
[Thu Nov 21 11:57:21.703125 2013] [authz_core:error] [pid 3940:tid 1180] [client 75.79.6.10:13869] AH01630: client denied by server configuration: C:/Apache24/htdocs/
[Thu Nov 21 11:59:36.296875 2013] [authz_core:error] [pid 3940:tid 1180] [client 75.79.6.149:45308] AH01630: client denied by server configuration: C:/Apache24/htdocs/

Maybe it's because I have:  As originally installed.
<Directory />
    AllowOverride none
    Require all denied
</Directory>

How would I allow "C:\MyDocuments2\Web"

Thank you,

Docfxit

Gregg

No, you want that for /

It just dawned on me that you need to make the change in one more place
in conf/extra/httpd-vhosts.conf change

<VirtualHost _default_:80>
DocumentRoot "${SRVROOT}/htdocs"
#ServerName www.example.com:80
</VirtualHost>

to

<VirtualHost _default_:80>
DocumentRoot "C:\MyDocuments2\Web"
#ServerName www.example.com:80
</VirtualHost>

you may also need to do same to the ssl conf file which our default (just an example) one is conf/extra/httpd-sni.conf

I am a bit curious though, did that mono install come with mod_mono for Apache. If not, I don't know how you will get active server pages working on Apache. There was mod_aspdotnet but was abandoned long ago. mod_mono is what you would use for Apache on unix and I have not found one for Windows, granted I have not looked in a few years.




Docfxit

Thanks for the reply...

I made this change:
<VirtualHost _default_:80>
DocumentRoot "C:\MyDocuments2\Web"
#ServerName www.example.com:80
</VirtualHost>

Quote from: Gregg on November 21, 2013, 09:23:18 PM

you may also need to do same to the ssl conf file which our default (just an example) one is conf/extra/httpd-sni.conf

I haven't made this change yet.  I'm not sure I need to.  I'll keep it in mind.

Quote from: Gregg on November 21, 2013, 09:23:18 PM

I am a bit curious though, did that mono install come with mod_mono for Apache. If not, I don't know how you will get active server pages working on Apache. There was mod_aspdotnet but was abandoned long ago. mod_mono is what you would use for Apache on unix and I have not found one for Windows, granted I have not looked in a few years.

Yes it's for windows.  I downloaded it from: http://mono-project.com/Mod_mono

If you know of a better solution, I'm happy to try anything that will work.

I'm not getting an error now.  This looks like progress. Instead of it displaying my web page it's displaying the default.asp file.

Thank you,

Docfxit

Gregg

You may need something like:
AddHandler mono .asp .aspx

Docfxit

Thanks for the reply...

Quote from: Gregg on November 22, 2013, 02:03:05 AM
You may need something like:
AddHandler mono .asp .aspx

Good try.  It sounds reasonable.   It didn't solve the problem.

Thanks,

Docfxit

mario

You load the module?

LoadModule mono_module modules/mod_mono.so

You have installed and running the mod-mono-server2 and configured the path?
MonoServerPath /usr/bin/mod-mono-server2