LP#1268619: Sample Websocket translator Apache 2.2 configuration
[OpenSRF.git] / examples / apache2 / websockets.conf
1 # :vim set syntax apache                                                        
2 #
3 # This is the top-level configuration file for the 
4 # apache2-websockets instance.  For example, in Debian
5 # this file lives in /etc/apache2-websockets/sites-available/
6                                                                                 
7 LogLevel debug                                                                  
8 # - log locally                                                                 
9 CustomLog /var/log/apache2-websockets/access.log combined                       
10 ErrorLog /var/log/apache2-websockets/error.log
11 # Add the PID to the error log (Apache 2.4 only)
12 # ErrorLogFormat "[%t] [%P] [%l] [pid %P] %F: %E: [client %a] %M"                
13                                                                                 
14 # ----------------------------------------------------------------------------------
15 # Set up our SSL virtual host                                                   
16 # ----------------------------------------------------------------------------------
17 Listen 7682
18 NameVirtualHost *:7682                                                          
19 <VirtualHost *:7682>                                                            
20     DocumentRoot /var/www                                                       
21     ServerName localhost:7682                                                   
22     ServerAlias 127.0.0.1:7682                                                  
23     SSLEngine on                                                                
24     SSLHonorCipherOrder On                                                      
25     SSLCipherSuite ECDHE-RSA-AES256-SHA384:AES256-SHA256:RC4:HIGH:!MD5:!aNULL:!EDH:!AESGCM
26
27     # re-use the certs from the main apache instance
28     SSLCertificateFile /etc/apache2/ssl/server.crt
29     SSLCertificateKeyFile /etc/apache2/ssl/server.key
30 </VirtualHost>                                                                  
31                                                                                 
32 Listen 7680
33 NameVirtualHost *:7680                                                          
34 <VirtualHost *:7680>                                                            
35     ServerName localhost:7680                                                   
36     ServerAlias 127.0.0.1:7680                                                  
37     DocumentRoot /var/www                                                       
38 </VirtualHost>                                                                  
39                                                                                 
40 <Location /osrf-websocket-translator>                                           
41     SetHandler websocket-handler                                                
42     WebSocketHandler /usr/lib/apache2/modules/osrf_websocket_translator.so osrf_websocket_init
43 </Location>