OpenNMS WebUI and SSL - opennms

I've installed OpenNMS (1.12.8) on CentOS 6.5 but I'm having a tough time getting the Web interface to run under SSL. I can start OpenNMS with it's default port setting of 8980, but when I attempt to modify the /opt/opennms/etc/opennms.properties file to listen on port 8443, it simply never works. According to the docs, it should work simply by uncommenting a single line of the config!
I can see port 8980 open via netstat, but I never see 8443. I can even change 8980 to 80 and it works as expected, so I think that the opennms.properties file is OK. At this point, I assume that there's something deeper that I'm missing regarding Jetty's configuration and HTTPS. Any thoughts?

I tried to enable SSL using the built in Jetty in OpenNMS and it didn't work either.
Right now I am running Opennms under SSL using apache.
What you need to do to achieve it is pretty simple:
First install apache.
Then configure your site's .conf file. Mine looks like this:
<IfModule mod_ssl.c>
ProxyRequests Off
# Rewrite http to https
RewriteEngine on
RewriteCond %{80} !^443$
RewriteRule ^/?(.*) https://%{HTTP_HOST}/$1 [NC,R=301,L]
<VirtualHost *:443>
# General setup for the virtual host
DocumentRoot "/opt/opennms/jetty-webapps/opennms"
<Directory "/opt/opennms/jetty-webapps/opennms">
Order allow,deny
Allow from all
</Directory>
SSLEngine on
SSLProtocol all -SSLv2
SSLCipherSuite HIGH:!ADH
# Set up ssl cerfiticates
SSLCertificateFile "/home/ubuntu/2b0a025bef6e41.crt"
SSLCertificateKeyFile "/home/ubuntu/keyFile.key"
SSLCertificateChainFile "/home/ubuntu/gd_bundle-g2-g1.crt"
CustomLog /var/log/apache2/ssl_request_log ssl_combined
</VirtualHost>
</IfModule>
In the configuration file, you need to use your own DocumentRoot, Directory, as well as the directory for SSL cerfiticates.
Then enable ssl module and your site by running,
sudo a2enmod ssl
sudo a2ensite your-site.conf
Finally restart apache.
sudo service apache2 restart

Related

Apache 403 forbidden when visiting website

I'm running Vagrant and Virtualbox on my macOS Catalina. Installed latest versions of both software and I created a vagrant file with PuPHPet and used Apache as webserver. Ran vagrant up and all fine.
I've added a vhost like I allways do and have running on a different Mac (with macOS Mojave).
However, if I access the website on de virtual machine, I get a 403, access forbidden.
The default host that is setup, with html, seems to run fine. But this is not running php, only html.
My vhost file:
<VirtualHost *:80>
ServerName www.domain.test
## Vhost docroot
DocumentRoot /var/www/domain
## Directories, there should at least be a declaration for /var/www/html
<Directory "/var/www/domain/public">
Options Indexes FollowSymlinks MultiViews
AllowOverride All
Require all granted
<FilesMatch "\.php$">
Require all granted
SetHandler proxy:fcgi://127.0.0.1:9000
</FilesMatch>
</Directory>
## Logging
ErrorLog "/var/log/apache2/default_vhost_80_error.log"
ServerSignature Off
CustomLog "/var/log/apache2/default_vhost_80_access.log" combined
## Custom fragment
</VirtualHost>
Try after enabling php mods, for my php5 project, I have used:
a2enmod php5
a2enmod headers
a2enmod rewrite

New xampp security concept: Access Forbidden Error 403 - Windows 7 - phpMyAdmin

I have downloaded and installed XAMPP 1.8.1 for Windows on Windows 7 Ultimate. I have set up XAMPP to run together with IIS as per these instructions
All good so far, my PHP sites run locally and everything except phpMyAdmin is available from the XAMPP menu.
However when I try to access phpMyAdmin I get this error:
Access forbidden!
New XAMPP security concept:
Access to the requested directory is only available from the local
network.
This setting can be configured in the file "httpd-xampp.conf".
I've found several answers via Google and some on this site. However, so far, none of the solutions I've tried have resolved the issue.
Here is my httpd-xampp.conf file:
#
# XAMPP settings
#
<IfModule env_module>
SetEnv MIBDIRS "C:/xampp/php/extras/mibs"
SetEnv MYSQL_HOME "\\xampp\\mysql\\bin"
SetEnv OPENSSL_CONF "C:/xampp/apache/bin/openssl.cnf"
SetEnv PHP_PEAR_SYSCONF_DIR "\\xampp\\php"
SetEnv PHPRC "\\xampp\\php"
SetEnv TMP "\\xampp\\tmp"
</IfModule>
#
# PHP-Module setup
#
LoadFile "C:/xampp/php/php5ts.dll"
LoadModule php5_module "C:/xampp/php/php5apache2_4.dll"
<FilesMatch "\.php$">
SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch "\.phps$">
SetHandler application/x-httpd-php-source
</FilesMatch>
#
# PHP-CGI setup
#
#<FilesMatch "\.php$">
# SetHandler application/x-httpd-php-cgi
#</FilesMatch>
#<IfModule actions_module>
# Action application/x-httpd-php-cgi "/php-cgi/php-cgi.exe"
#</IfModule>
<IfModule php5_module>
PHPINIDir "C:/xampp/php"
</IfModule>
<IfModule mime_module>
AddType text/html .php .phps
</IfModule>
ScriptAlias /php-cgi/ "C:/xampp/php/"
<Directory "C:/xampp/php">
AllowOverride None
Options None
Require all denied
<Files "php-cgi.exe">
Require all granted
</Files>
</Directory>
<Directory "C:/xampp/cgi-bin">
<FilesMatch "\.php$">
SetHandler cgi-script
</FilesMatch>
<FilesMatch "\.phps$">
SetHandler None
</FilesMatch>
</Directory>
<Directory "C:/xampp/htdocs/xampp">
<IfModule php5_module>
<Files "status.php">
php_admin_flag safe_mode off
</Files>
</IfModule>
AllowOverride AuthConfig
</Directory>
<IfModule alias_module>
Alias /security "C:/xampp/security/htdocs/"
<Directory "C:/xampp/security/htdocs">
<IfModule php5_module>
<Files "xamppsecurity.php">
php_admin_flag safe_mode off
</Files>
</IfModule>
AllowOverride AuthConfig
Require all granted
</Directory>
Alias /licenses "C:/xampp/licenses/"
<Directory "C:/xampp/licenses">
Options +Indexes
<IfModule autoindex_color_module>
DirectoryIndexTextColor "#000000"
DirectoryIndexBGColor "#f8e8a0"
DirectoryIndexLinkColor "#bb3902"
DirectoryIndexVLinkColor "#bb3902"
DirectoryIndexALinkColor "#bb3902"
</IfModule>
Require all granted
</Directory>
Alias /phpmyadmin "C:/xampp/phpMyAdmin/"
<Directory "C:/xampp/phpMyAdmin">
AllowOverride AuthConfig Limit
Order allow,deny
Allow from all
Require all granted
</Directory>
Alias /webalizer "C:/xampp/webalizer/"
<Directory "C:/xampp/webalizer">
<IfModule php5_module>
<Files "webalizer.php">
php_admin_flag safe_mode off
</Files>
</IfModule>
AllowOverride AuthConfig
Require all granted
</Directory>
</IfModule>
#
# New XAMPP security concept
#
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
Order deny,allow
Allow from all
Require all granted
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>
Does anyone have any idea as to what I'm missing?
All you have to do is to edit the httpd-xampp.conf
from Require local to Require all granted in the LocationMatch tag.
That's it!
In New Xampp
All you have to do is to edit the file:
C:\xampp\apache\conf\extra\httpd-xampp.conf
and go to Directory tag as below:
<Directory "C:/xampp/phpMyAdmin">
and then change
Require local
To
Require all granted
in the Directory tag.
Restart the Xampp. That's it!
Require all granted seemed a bit to far for me. Looking at the documentation I used: Require ip 192.168 to allow all internal access.
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
Require local
Require ip 192.168
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>
Update for XAMPP 7.3.*
If you get into same problem for phpmyadmin in the newest XAMPP, as I had.
The solution is written inside the official documentation located in [XAMPP IP]/dashboard/docs/access-phpmyadmin-remotely.html
To enable remote access to phpMyAdmin from other hosts, follow these steps:
Launch the stack manager by double-clicking the XAMPP icon in the mounted disk image.
Ensure that Apache and MySQL services are running in the "Services" tab of the stack manager (or start them as needed).
Open a new terminal from the "General" tab of the stack manager.
Edit the /opt/lampp/etc/extra/httpd-xampp.conf file.
Within this file, find the block <Directory "/opt/lampp/phpmyadmin">
Update this block and replace Require local with Require all granted,
Save the file and restart the Apache service using the stack manager.
Note for section (4) To edit this file make sure you have vim installed.
Note for section (5) Instead of allowing access to all, which is highly insecure, if your computer is connected to a network. A safer approach is to limit the access to only set of IPs as suggested by #Gunnar Bernstein.
In my case I did:
<Directory "/opt/lampp/phpmyadmin">
AllowOverride AuthConfig Limit
Require local
Require ip 192.168
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</Directory>
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
Require all granted
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>
Good luck!!!!
Try to reinstall new version of XAMPP. Find "<Directory "C:/xampp/php">" and then change to something like this
<Directory "C:/xampp/php">
AllowOverride AuthConfig Limit
Order allow,deny
Allow from all
Require all granted
</Directory>
You will have to edit 2 files - 1. httpd-vhosts.conf & 2. httpd-xampp.conf
NOTE : Make sure u backup files ( httpd-xampp.conf ) and (
httpd-vhosts.conf ) , Both Files are located in
Drive:\xampp\apache\conf\extra
Open httpd-vhosts.conf file and in the bottom of the file change it
<VirtualHost *:80>
DocumentRoot “E:/xampp/htdocs/”
ServerName localhost
<Directory E:/xampp/htdocs/>.
Require all granted
</Directory>
</VirtualHost>
Here E:/xampp is my project workspace, you can change it as per your settings
and Second Change is on httpd-xampp.conf file and in the bottom of the file change it
#
# New XAMPP security concept
#
<LocationMatch “^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))”>
Order deny,allow
Allow from all
Allow from ::1 127.0.0.0/8
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>
To access the requested directory other than local network, you need to change the XAMPP security concept
configured in the file "httpd-xampp.conf".
File location xampp\apache\conf\extra\httpd-xampp.conf
Require Directive Selects which authenticated users can access a resource
Syntax « Require entity-name [entity-name] ...
From « XAMPP security concept allows only local environment - Require local
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
Require local
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>
To « XAMPP security concept allows any environment - Require all granted
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
Require all granted
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>
Access forbidden! message from HTML Page.
Allow Directive Controls which hosts can access an area of the server
Syntax « Allow from all|host|env=[!]env-variable [host|env=[!]env-variable] ...
Allowing only local environment. Using any of the below specified url's.
http://localhost/phpmyadmin/
http://127.0.0.1/phpmyadmin/
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
Order deny,allow
Deny from all
Allow from ::1 127.0.0.0/8 \
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>
Allowing only to specified IPv4, IPv6 address spaces.
Link-local addresses for IPv4 are defined in the address block 169.254.0.0/16 in CIDR notation. In IPv6, they are assigned the address block fe80::/10
A unique local address (ULA) is an IPv6 address in the block fc00::/7
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
Order deny,allow
Deny from all
Allow from ::1 127.0.0.0/8 \
fc00::/7 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 \
fe80::/10 169.254.0.0/16
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>
Allowing for any network address. Allow from all
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
Order deny,allow
Allow from all
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>
404 - XAMPP Control Panel: Unable to start Apache HTTP server.
URL: http://localhost/xampp/index.php
Error «
Not Found
HTTP Error 404. The requested resource is not found.
Required default Apache HTTP server port 80 is actually used by other Service.
You need to find the service running with port 80 and stop the service, then start the Apache HTTP server.
Use Netstat to displays active TCP connections, ports on which the computer is listening.
C:\Users\yashwanth.m>netstat -ano
Active Connections
Proto Local Address Foreign Address State PID
TCP 0.0.0.0:80 0.0.0.0:0 LISTENING 2920
TCP 0.0.0.0:135 0.0.0.0:0 LISTENING 1124
TCP 127.0.0.1:5354 0.0.0.0:0 LISTENING 3340
TCP [::]:80 [::]:0 LISTENING 2920
C:\Users\yashwanth.m>netstat -ano |findstr 2920
TCP 0.0.0.0:80 0.0.0.0:0 LISTENING 2920
TCP 0.0.0.0:443 0.0.0.0:0 LISTENING 2920
TCP [::]:80 [::]:0 LISTENING 2920
TCP [::]:443 [::]:0 LISTENING 2920
C:\Users\yashwanth.m>taskkill /pid 2920 /F
SUCCESS: The process with PID 2920 has been terminated.
Change listening port from main Apache HTTP server configuration file D:\xampp\apache\conf\httpd.conf. Ex: 81. From Listen 80 To Listen 81, the access URL will be http://localhost:81/xampp/index.php.
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 0.0.0.0:80
#Listen [::]:80
Listen 80
For more information related to httpd and virtual host on XAMPP
Comment out the line Require local in httpd-xampp.conf.
Restart Apache.
Worked for me connecting my mobile phone to my test web-site on my PC.
No idea of the security implications.
just remove:
Alias /phpmyadmin "C:/xampp2/phpMyAdmin/"
<Directory "C:/xampp2/phpMyAdmin">
AllowOverride AuthConfig
Require all granted
</Directory>
and remove phpmyadmin from:
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|server-status|server-info))">
Some of the Answers are correct, but in case of working with new xampp or with some one not working other answers try this:
just go to the xampp folder:
xampp/apache/conf/extra/httpd-xampp.c­onf
and if you are trying to access from local ip in your network so change,
Alias /phpmyadmin "C:/xampp/phpMyAdmin/"
<Directory "C:/xampp/phpMyAdmin">
AllowOverride AuthConfig
Require local
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</Directory>
Change to :
Alias /phpmyadmin "C:/xampp/phpMyAdmin/"
<Directory "C:/xampp/phpMyAdmin">
AllowOverride AuthConfig
Require all granted
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</Directory>
Note: this is just for text, for the security of the xampp has some search....
In your xampppath\apache\conf\extra open file httpd-xampp.conf and find the below tag:
<LocationMatch "^/(?i:(?:xampp|licenses|phpmyadmin|webalizer|server-status|server-info))">
Order deny,allow
Deny from all
Allow from ::1 127.0.0.0/8
ErrorDocument 403 /error/HTTP_XAMPP_FORBIDDEN.html.var
and add Allow from all after Allow from ::1 127.0.0.0/8 {line}
Restart xampp, and you are done.
If you're using a newer XAMPP (for example for PHP 5.6, 7) which is built with "Bitnami" installer and it includes Apache 2.4.x then this applies:
https://httpd.apache.org/docs/2.4/upgrading.html#run-time
2.2 configuration:
Order allow,deny
Allow from all
2.4 configuration:
Require all granted
This also applies to VirtualHost sections, if you have any custom virtualhost definitions.
Ubuntu (Linux)
:- $ sudo gedit /opt/lampp/etc/extra/httpd-xampp.conf
Comment "Deny from all" in the following section,
Change file
# New XAMPP security concept
# <LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
Order deny,allow
#Deny from all
#Require local
Allow from ::1 127.0.0.0/8 \
fc00::/7 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 \
fe80::/10 169.254.0.0/16
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
For many it's a permission issue, but for me it turns out the error was brought about by a mistake in the form I was trying to submit. To be specific i had accidentally put ">" sign after the value of "action". So I would suggest you take a second look at your code
I tried everything but nothing worked. So I just used : chmod -R 777 to htdocs. At least it's only in my local.
A reason for this could be Skype as well! If you use the default XAMPP settings, they both would run on the same port (80). You can:
Turn off Skype
Change the XAMPP port
G:\xampp\apache\conf\extra\httpd-vhosts.conf
#start block
NameVirtualHost *:80
<VirtualHost *:80>
ServerName localhost
#change your directory name
DocumentRoot "G:\xampp\htdocs"
</VirtualHost>
#Your vertual Host
<VirtualHost *:80>
DocumentRoot "G:/xampp/htdocs/dev2018/guessbook"
ServerName dev.foreign-recruitment
<Directory "G:/xampp/htdocs/dev2018/guessbook/">
</Directory>
</VirtualHost>
#end block
This could be because of wrong configuration, esp if your other sites are working fine.
<VirtualHost cmsdemo.git:88>
DocumentRoot "C:/Projects/rwp/"
ServerName cmsdemo.git
<Directory C:/Projects/cmsdemo/>
Require all granted
AllowOverride All
</Directory>
</VirtualHost>
Notice in DocumentRoot I am specifying one folder and in Directory, I am specifying another hence 403 Error. This fixed my problem.
for anyone having problems when using xampp and IIS using windows,
check the xamp panel on apache which port is using
Let assume apache is using port 81 then try this
http://127.0.0.1:81/
for me worked like charm, it might help someone in future
With Windows 10, these options don't work for me.
After reinstalling many times without understand the initial warning about User Account Control (UAC), it work me with these steps:
Rename C:\xampp to C:\xampp_old,
Create manually the C:\xampp folder
Reinstall XAMPP in C:\xampp
Move your app, if it was configurated, to new installation folder.
Now, if you want you can delete C:\xampp_old.
I tried to install XAMPP in my desktop folder, but it failed me because my Windows user contains a space character and Apache doesn't run.

OS X Server ignores virtual hosts

I have a OS X Server 10.8 [with the Server App]. I have enabled the websites service and I've added the path to /Volumes/dev1/http as the root for my Server Website.
I've edited the file in /private/etc/apache2/httpd.conf and added the following line: Include /Volumes/dev1/http/.virtual-hosts
The file at /Volumes/dev1/http/.virtual-hosts is something like:
listen 80
listen 443
servername "site"
serveradmin "mail#myemail.com"
namevirtualhost *:80
namevirtualhost *:443
directoryindex .index.php index.html index.php
options -indexes -multiviews +followsymlinks
<directory /Volumes/dev1/http>
allowoverride all
</directory>
<virtualhost *:80 *:443>
servername site.com
serveralias www.site.com
documentroot "/Volumes/dev1/http/com-site"
rewriteengine on
</virtualhost>
The Server completely ignores this file, even though if I put in some random characters and run apachectl -t it says that the syntax is not OK.
I've even tried only having directoryindex .index.php in this file and it still has no effect - it returns 403 Forbidden, even thought .index.php is present.
This exact configuration works like a charm on an older 10.6 Server.
Thanks for taking the time to think about my problem!
After some google-ing and trial and error approach the answer is: when using the Server App in OS 10.8 you need to put the include directive in /Library/Server/Web/Config/apache2/httpd_server_app.conf not in /private/etc/apache2/httpd.conf

Getting SSL to work with Apache/Passenger on Mac OS with "Snow Leopard"

I have a Mac OS with "Snow Leopard" v10.6.5 and I am developing a Ruby on Rails 3 application using Passenger Preference Pane v 1.3.
To continue to develop my application I need a SSL support, but I have a similar problem.
The steps I've followed are from a default apache osx install:
Install Passenger and Passenger Preference Pane.
Add my Ruby on Rails application (that works)
Create my ca.key, server.crt and server.key as detailed on the Apple website...
... but during the third step I had to stop for the following reasons happened on editing the /private/etc/apache2/httpd.conf file (see the Apple website for more info):
1.
Port 80 should be changed to #Port 80.
I have not found "Port 80", but I think this is not a problem because even if it is present in the code, it has been commented out.
2.
You will need to add the following just below where the Port directive was:
< IfModule mod_ssl.c>
Listen 443
Listen 80
< /IfModule>
If I add these lines of code and restart apache2, my application no longer works.
3.
[...] The two lines should now look like this:
LoadModule ssl_module libexec/httpd/libssl.so
AddModule mod_ssl.c
Since the code 'AddModule mod_ssl.c' does not exist (LoadModule is ready for use), I tried to add it and restart apache2, but my application no longer works.
4.
Now find the “ServerName” directive and make sure it has 127.0.0.1 for it’s entry.
ServerName 127.0.0.1
I do not know if I have to enter it, since I use Passenger. However, in the file I found the line of code (already commented) '#ServerName www.example.com:80'.
Regarding the code for Passenger for the SSL certificates, I suppose that it must be the same as the problem reported above.
I think that this is due to the fact that the guide was written a long time ago. So, what should I do to use SSL with apache2?
Just to be clear, I also include the code related to Passenger Preference Pane...
.../private/etc/apache2/httpd.conf
LoadModule passenger_module /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.2/ext/apache2/mod_passenger.so
PassengerRoot /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.2
PassengerRuby /usr/local/bin/ruby
# Added by the Passenger preference pane
# Make sure to include the Passenger configuration (the LoadModule,
# PassengerRoot, and PassengerRuby directives) before this section.
<IfModule passenger_module>
NameVirtualHost *:80
<VirtualHost *:80>
ServerName _default_
</VirtualHost>
Include /private/etc/apache2/passenger_pane_vhosts/*.conf
</IfModule>
.../private/etc/apache2/passenger_pane_vhosts/subdomain.domain.com.vhost.conf
<VirtualHost *:443>
ServerName subdomain.domain.com
DocumentRoot "/Users/<my_user_name>/Sites/subdomain/public"
RackEnv development
<Directory "/Users/<my_user_name>/Sites/subdomain/public">
Order allow,deny
Allow from all
</Directory>
# SSL Configuration
SSLEngine on
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP
SSLOptions +FakeBasicAuth +ExportCertData +StdEnvVars +StrictRequire
#Self Signed certificates
SSLCertificateFile /private/etc/apache2/ssl/server.crt
SSLCertificateKeyFile /private/etc/apache2/ssl/server.key
SSLCertificateChainFile /private/etc/apache2/ssl/ca.crt
SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0
</VirtualHost>
I just hit the same issue and this is what I did to get it working.
Follow your same steps to generate the keys (also further on it mentions removing the passphrase. I had to do this for things to work).
Next, I did the following to enable SSL on Apache:
In the "/private/etc/apache2/httpd.conf" file on my Snow Leopard there was a line:
# Include /private/etc/apache2/extra/httpd-manual.conf
I just removed the # and saved the file.
Next edit the file (/private/etc/apache2/extra/httpd-manual.conf) and make sure
SSLCertificateFile
SSLCertificateKeyFile
point to the correct key files that you created.
Next there is an entry in the same file (/private/etc/apache2/extra/httpd-manual.conf) that begins:
<VirtualHost _default_:443>
I had to comment out that file and everything after it (or you could just delete it) up to the
</VirtualHost>
entry. That entry conflicted with my site.
The Virtual host entry you had looks correct, but for completeness I will add mine here.
I just modified the original Vhost file that was created by Passenger PrefsPane for my site:
<VirtualHost *:443 *:80>
ServerName mysite.local
DocumentRoot "/Users/username/mysite/public"
RackEnv development
<Directory "/Users/username/mysite/public">
Order allow,deny
Allow from all
</Directory>
SSLEngine on
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLOptions +FakeBasicAuth +ExportCertData +StdEnvVars +StrictRequire
SSLCertificateFile /etc/apache2/sslkey/server.crt
SSLCertificateKeyFile /etc/apache2/sslkey/server.key
SSLCertificateChainFile /etc/apache2/sslkey/ca.crt
SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0
</VirtualHost>
Next restart Apache and you should be good to go. :-)

What is the mac equivalent of "/etc/apache2/sites-available"?

I am installing Koha from source. Generic unix directions indicate the following step after sudo make install
sudo ln -s /etc/koha/koha-httpd.conf /etc/apache2/sites-available/koha
huh?
My apache2 directory contains no sites-available, only
/private/etc/apache2/extra
/private/etc/apache2/httpd.conf
/private/etc/apache2/magic
/private/etc/apache2/mime.types
/private/etc/apache2/original
/private/etc/apache2/other
/private/etc/apache2/users
I am supposed to be able to Browse to http://servername:8080/ to run Koha, where I take it "servername" is specified in koha-httpd.conf as follows:
## Intranet
<VirtualHost 192.168.1.4:8080>
ServerAdmin webmaster#local
DocumentRoot /usr/share/koha/intranet/htdocs
ServerName John-Breedloves-Mac-mini.local:8080
# ServerAlias intranet.mydomain.com
ScriptAlias /cgi-bin/koha/ "/usr/share/koha/intranet/cgi-bin/"
ScriptAlias /index.html "/usr/share/koha/intranet/cgi-bin/mainpage.pl"
ScriptAlias /search "/usr/share/koha/intranet/cgi-bin/search.pl"
ErrorLog /var/log/koha/koha-error_log
# TransferLog /var/log/koha/koha-access_log
SetEnv KOHA_CONF "/etc/koha/koha-conf.xml"
SetEnv PERL5LIB "/usr/share/koha/lib"
Options +FollowSymLinks
ErrorDocument 400 /cgi-bin/koha/errors/400.pl
ErrorDocument 401 /cgi-bin/koha/errors/401.pl
ErrorDocument 403 /cgi-bin/koha/errors/403.pl
ErrorDocument 404 /cgi-bin/koha/errors/404.pl
ErrorDocument 500 /cgi-bin/koha/errors/500.pl
RewriteEngine On
However when I go to http://john-breedloves-mac-mini.local:8080/, I get:
It works!
Which,is, like ironical or something.
Help a noob out.
It looks like /private/etc/apache2/other/ would be the approximately corresponding folder. /etc/apache2/httpd.conf contains a directive Include /private/etc/apache2/other/*.conf that includes all files in that folder, much like the sites-available folder common on Linux installations of Apache.
Run apachectl -S which is shorthand for apachectl -t -D DUMP_VHOSTS
According to the apachectl man file, this will show parsed settings (currently only vhost settings). Incidentally, it also checks your config file for errors.
Andrew's answer is correct. On my install, I additionally had to change
Order allow,deny
Deny from all
to
Order allow,deny
Allow from all
in /etc/apache2/httpd.conf.
The fact that you're getting a server at :8080 indicates that you may be running a different apache config from the base system install, such as MAMP; I don't believe that apache by default listens on :8080.
I had this problem too. It seems to occour because the default version of apache that is installed on osx over-rides other versions. to disable it go to "System Preferences > Sharing" and untick "web sharing".
good luck!
Please note that ServerRoot specifies where the subdirectories conf and logs can be found.
In my httpd.conf, it is set to /usr

Resources