mirror of
				https://github.com/advplyr/audiobookshelf.git
				synced 2025-11-03 19:07:00 -05:00 
			
		
		
		
	Merge pull request #136 from zv0n/master
Updated Readme to include Apache config.
This commit is contained in:
		
						commit
						3f13d35241
					
				
							
								
								
									
										32
									
								
								readme.md
									
									
									
									
									
								
							
							
						
						
									
										32
									
								
								readme.md
									
									
									
									
									
								
							@ -149,6 +149,38 @@ server
 | 
			
		||||
}
 | 
			
		||||
``` 
 | 
			
		||||
 | 
			
		||||
### Apache Reverse Proxy
 | 
			
		||||
 | 
			
		||||
Add this to the site config file on your Apache server after you have changed the relevant parts in the <> brackets, and inserted the path to you certificates.
 | 
			
		||||
For this to work you must enable at least the following mods using `a2enmod`:
 | 
			
		||||
  - `ssl`
 | 
			
		||||
  - `proxy_module`
 | 
			
		||||
  - `proxy_wstunnel_module`
 | 
			
		||||
  - `rewrite_module`
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
<IfModule mod_ssl.c>
 | 
			
		||||
<VirtualHost *:443>
 | 
			
		||||
    ServerName <sub>.<domain>.<tld>
 | 
			
		||||
 | 
			
		||||
    ErrorLog ${APACHE_LOG_DIR}/error.log
 | 
			
		||||
    CustomLog ${APACHE_LOG_DIR}/access.log combined
 | 
			
		||||
 | 
			
		||||
    ProxyPreserveHost On
 | 
			
		||||
    ProxyPass / http://localhost:<audiobookshelf_port>/
 | 
			
		||||
    RewriteEngine on
 | 
			
		||||
    RewriteCond %{HTTP:Upgrade} websocket [NC]
 | 
			
		||||
    RewriteCond %{HTTP:Connection} upgrade [NC]
 | 
			
		||||
    RewriteRule ^/?(.*) "ws://localhost:<audiobookshelf_port>/$1" [P,L]
 | 
			
		||||
 | 
			
		||||
    # unless you're doing something special this should be generated by a
 | 
			
		||||
    # tool like certbot by let's encrypt
 | 
			
		||||
    SSLCertificateFile /path/to/cert/file
 | 
			
		||||
    SSLCertificateKeyFile /path/to/key/file
 | 
			
		||||
</VirtualHost>
 | 
			
		||||
</IfModule>
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## Contributing
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user