Advertisement
gosoft

Untitled

Aug 2nd, 2022 (edited)
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.62 KB | None | 0 0
  1. Apache configuration
  2. nc.mynextcloud.com.conf
  3. <IfModule mod_ssl.c>
  4. <VirtualHost *:443>
  5. # The ServerName directive sets the request scheme, hostname and port that
  6. # the server uses to identify itself. This is used when creating
  7. # redirection URLs. In the context of virtual hosts, the ServerName
  8. # specifies what hostname must appear in the request's Host: header to
  9. # match this virtual host. For the default virtual host (this file) this
  10. # value is not decisive as it is used as a last resort host regardless.
  11. # However, you must set it for any further virtual host explicitly.
  12. ServerName nc.mynextcloud.com
  13. ServerAlias nc.mynextcloud.com
  14. SSLEngine on
  15.  
  16. ServerAdmin info@mynextcloud.com
  17. DocumentRoot /var/www/nextcloud
  18.  
  19. # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
  20. # error, crit, alert, emerg.
  21. # It is also possible to configure the loglevel for particular
  22. # modules, e.g.
  23. #LogLevel info ssl:warn
  24.  
  25. ErrorLog ${APACHE_LOG_DIR}/error.log
  26. CustomLog ${APACHE_LOG_DIR}/access.log combined
  27.  
  28. # For most configuration files from conf-available/, which are
  29. # enabled or disabled at a global level, it is possible to
  30. # include a line for only one particular virtual host. For example the
  31. # following line enables the CGI configuration for this host only
  32. # after it has been globally disabled with "a2disconf".
  33. #Include conf-available/serve-cgi-bin.conf
  34. <IfModule mod_headers.c>
  35. Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains"
  36. </IfModule>
  37.  
  38. Include /etc/letsencrypt/options-ssl-apache.conf
  39. SSLCertificateFile /etc/letsencrypt/live/nc.mynextcloud.com-0001/fullchain.pem
  40. SSLCertificateKeyFile /etc/letsencrypt/live/nc.mynextcloud.com-0001/privkey.pem
  41. </VirtualHost>
  42. </IfModule>
  43.  
  44. ------------------------------------------------------
  45.  
  46. office.mynextcloud.com-le-ssl.conf
  47. <IfModule mod_ssl.c>
  48. <VirtualHost *:443>
  49. ServerName office.mynextcloud.com:443
  50. ServerAlias office.mynextcloud.com
  51. AllowEncodedSlashes NoDecode
  52. ProxyPreserveHost On
  53.  
  54.  
  55. # static html, js, images, etc. served from coolwsd
  56. # browser is the client part of Collabora Online
  57. ProxyPass /browser http://127.0.0.1:9980/browser retry=0
  58. ProxyPassReverse /browser http://127.0.0.1:9980/browser
  59.  
  60.  
  61. # WOPI discovery URL
  62. ProxyPass /hosting/discovery http://127.0.0.1:9980/hosting/discovery retry=0
  63. ProxyPassReverse /hosting/discovery http://127.0.0.1:9980/hosting/discovery
  64.  
  65.  
  66. # Capabilities
  67. ProxyPass /hosting/capabilities http://127.0.0.1:9980/hosting/capabilities retry=0
  68. ProxyPassReverse /hosting/capabilities http://127.0.0.1:9980/hosting/capabilities
  69.  
  70.  
  71. # Main websocket
  72. ProxyPassMatch "/cool/(.*)/ws$" ws://127.0.0.1:9980/cool/$1/ws nocanon
  73.  
  74.  
  75. # Admin Console websocket
  76. ProxyPass /cool/adminws ws://127.0.0.1:9980/cool/adminws
  77.  
  78.  
  79. # Download as, Fullscreen presentation and Image upload operations
  80. ProxyPass /cool http://127.0.0.1:9980/cool
  81. ProxyPassReverse /cool http://127.0.0.1:9980/cool
  82. # Compatibility with integrations that use the /lool/convert-to endpoint
  83. ProxyPass /lool http://127.0.0.1:9980/cool
  84. ProxyPassReverse /lool http://127.0.0.1:9980/cool
  85.  
  86. Include /etc/letsencrypt/options-ssl-apache.conf
  87. SSLCertificateFile /etc/letsencrypt/live/office.mynextcloud.com/fullchain.pem
  88. SSLCertificateKeyFile /etc/letsencrypt/live/office.mynextcloud.com/privkey.pem
  89. </VirtualHost>
  90. </IfModule>
  91.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement