Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for OpenID connect - on Apache2.4 on Windows 64 #275

Closed
ujwalajadhav opened this issue May 26, 2017 · 29 comments
Closed

Support for OpenID connect - on Apache2.4 on Windows 64 #275

ujwalajadhav opened this issue May 26, 2017 · 29 comments

Comments

@ujwalajadhav
Copy link

Environment
  • mod_auth_openidc version 2.2.0 / 1.8.10
  • Apache version 2.4
  • platform/distro - Windows 7 64 -bit

Steps did to install mod_auth_openidc:

  1. Registered application by creating a client at the corporate oidc server
    Saved clientid, client secret, Redirect_URIs and other required information.

  2. Downloaded the mod_auth_openidc library from Github- https://github.com/pingidentity/mod_auth_openidc/releases
    File: mod_auth_openidc-2.2.0-apache-2.4.x-win64.zip
    Unzipped this file and copied the contents from bin and modules folder in the Apache folders respectively

  3. Installed the curl-ca-bundle.crt which is in Apache24/bin folder by double clicking it.

  4. Modified the httpd.conf file and added the following line the file -
    LoadModule auth_openidc_module modules/mod_auth_openidc.so

  5. Configured mod_auth_openidc from template present at - https://github.com/pingidentity/mod_auth_openidc/blob/master/auth_openidc.conf
    Modified and saved this file with the client details done in step 1.

  6. Copied this file in the C:\Apache24\conf\ folder

After doing this configuration we restarted the server and it is not getting started.

When commented - “LoadModule auth_openidc_module modules/mod_auth_openidc.so” this line from httpd.conf file, there is no problem starting the server.

Expected behavior

Server should start and when accessing the webpage it should bring the SSO page asking for user credentials.

Actual behavior

Server is not getting started.

Configuration and Log files

No error in log files.

@zandbelt
Copy link
Member

You'll need to copy all of the files from the /bin folder in the ZIP file to the Apache /bin/ folder: 3 DLLs and the curl-ca-bundle.crt. The cjose.dll, libcurl.dll and jansson.dll are required dependencies.

@ujwalajadhav
Copy link
Author

Thank you for your reply.
Yes I have copied all the contents from bin folder in the ZIP file to Apache/bin/ folder as mentioned in the step 2, and still could not start the Apache server.

@ujwalajadhav
Copy link
Author

ujwalajadhav commented May 31, 2017

We could restart the Apache server with below resolution.

Resolution:

mod_auth_openidc library requires msvcr120.dll which is the newer version of Microsoft VC ++. It looks for this file. We used dependency walker software to see the tree and what are the required files for the mod_auth_openidc.iso. It showed missing msvcr120.dll file. We had to update the current vc++ which added this missing dll in the windows\System32 folder. and we could restart the server.

Also we had to add this statment - "Include conf/oidc.conf" in httpd.conf file.

Hope this helps for any future developers who are not able to restart the server when integrating with Openid connect.

@zandbelt
Copy link
Member

That's very useful information to have, thanks!

@tiwari3010
Copy link

@zandbelt Thanks for the posts above, I tried all the steps on Windows 8 and Windows 2012 R2, but apache is not starting

C:\Apache24\bin>httpd.exe -version
Server version: Apache/2.4.27 (Win64)
Apache Lounge VC15 Server built: Jul 7 2017 12:46:00
mod_auth_openidc-2.3.1-apache-2.4.x-win64
copied all the files to Bin and Module folder of apache24.
Confirmed I have Microsoft VC++ running on both windows 8 and 2012 R2.

While starting apache getting error:

The Apache service named reported the following error:

httpd.exe: Syntax error on line 181 of C:/Apache24/conf/httpd.conf: Cannot load modules/mod_auth_openidc.so into server: The specified module could not be found. .

Please suggest.

@zandbelt
Copy link
Member

zandbelt commented Sep 8, 2017

Perhaps you could try and use the dependency walker as well.

@zandbelt
Copy link
Member

zandbelt commented Sep 12, 2017

For the record: I can produce a version compiled with Visual Studio 2017 that would rely on the Visual C++ Redistributable for Visual Studio 2015.

Update: that is part of the stock release 2.3.2 now.
https://github.com/pingidentity/mod_auth_openidc/releases/tag/v2.3.2

@tiwari3010
Copy link

Hi @zandbelt, I would be interested in testing using Visual C++ Redistributable for 2015. Please send me the link I can download and steps to perform for running on my local or Windows 2012 R2 servers.

@andreasljung
Copy link

Hi

Did you get it to work?

I am trying to run the latest "release 2.3.2" and I get the error in the Event log when I try to start the Apache server from Activity Monitor

The Apache service named reported the following error:

httpd.exe: Syntax error on line 181 of C:/Apache24/conf/httpd.conf: Cannot load modules/mod_auth_openidc.so into server: The specified module could not be found. "

But if I try to run httpd.exe from commandline I get:

httpd.exe: Syntax error on line 181 of C:/Apache24/conf/httpd.conf: Cannot load
modules/mod_auth_openidc.so into server: %1 is not a valid Win32 application.

I am running:

Apache 2.4.28 x64
Microsoft Visual C++ 2015 Restributable (x64) - 14.0.24123

@zandbelt
Copy link
Member

Which Windows platform are you on? The binaries are 64bit.

@zandbelt
Copy link
Member

Can you run http://dependencywalker.com/ to see if/which dependency is the issue?

@andreasljung
Copy link

I am using Windows Server 2012 (64bit)

image

@zandbelt
Copy link
Member

Could it be that you are not using an Apache setup/package that is SSL enabled?

@andreasljung
Copy link

I have now enabled SSL for the apache server and installed OpenSSL for Windows 64 bit. But I still get the same error for this module.

@andreasljung
Copy link

It seemed to have been some issue with version 1.1.0 of OpenSSL 64bit. I saw the latest comment on this thread and instead I choose version 1.0.2 and then it worked.

https://stackoverflow.com/questions/40017498/cannot-load-modules-mod-ssl-so-into-server

@zandbelt
Copy link
Member

ah, right; I'll add that to the release notes, thanks

@ShirleyAu
Copy link

image

I cannot start the httpd.exe, anyone have idea?

@ujwalajadhav
Copy link
Author

Also, make sure you have latest copy of Microsoft VC++. Server won’t restart if missing msvcr120.dll file at windows\System32 folder. 

@ShirleyAu
Copy link

I already install Microsoft Visual C++ 2015-2019 Redistributable (x64).

image

image

@ping2sri
Copy link

Unable to find below modules. Can someone help on this.

Downloaded the mod_auth_openidc library from Github- https://github.com/pingidentity/mod_auth_openidc/releases
File: mod_auth_openidc-2.2.0-apache-2.4.x-win64.zip

@obou-uobo
Copy link

obou-uobo commented Dec 3, 2019

To: ping2sri
I found
File:mod_auth_openidc-2.3.11rc2licensed-apache-2.4.x-win64.zip
bellow site
https://mod-auth-openidc.org/download/?C=M;O=D

Isn't it available?

@ping2sri
Copy link

ping2sri commented Dec 3, 2019

obou-uobo,
https://mod-auth-openidc.org/download/?C=M;O=D link is working fine now. but still I am getting same error. Cannot load modules/mod_auth_openidc.so into server: The specified module could not be found.
my server has VC++ 2013.
image

@ping2sri
Copy link

ping2sri commented Dec 3, 2019

image
Dependency details.

@zandbelt
Copy link
Member

zandbelt commented Dec 3, 2019

support and licensing for the Windows build only comes as part of a commercial support subscription

@stagging18
Copy link

I am not able to see the mod_auth_openidc-2.2.0-apache-2.4.x-win64.zip file in any of the release.
Can anyone please help me to find this.

Regards,
Rajesh

@roman-la
Copy link

roman-la commented Jun 26, 2020

I had some struggle getting this to work, so i want to share my experience:

I also had this error:
httpd.exe: Syntax error on line 186 of C:/Program Files/Apache24/conf/httpd.conf: Cannot load modules/mod_auth_openidc.so into server: The specified module could not be found. .

The error is very misleading, since the file is obviously in the folder. The real problem was a missing dll file from openssl (libeay32.dll). The dependencywalker tool really helped me out here.

@stagging18 Look here https://mod-auth-openidc.org/download/?C=M;O=D

@Nareshgarg0976
Copy link

I am unable to find the latest version for windows. Could someone please help me with that?

@zandbelt
Copy link
Member

I am unable to find the latest version for windows. Could someone please help me with that?

#275 (comment)

@Nareshgarg0976
Copy link

I am getting this error.
C:\Apache24\bin>httpd
httpd: Syntax error on line 74 of C:/Apache24/conf/httpd.conf: Cannot load modules/mod_auth_openidc.so into server: The operating system cannot run %1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants