xombiemp / ultimate-torrent-setup

All the files needed for the Ultimate Torrent Setup, featuring Ubuntu, rtorrent, ruTorrent, Sonarr, Radarr.
232 stars 44 forks source link

apache not starting due to missing certs #29

Closed chaoticdude closed 8 years ago

chaoticdude commented 8 years ago

Followed the guide to a T, at the end when we restart Apache it fails to start--logs show the cert from LetsEncrypt isn't in the directories, so Apache can't start. Comment the cert path out, apache starts but can't access the site locally. Where to get the certs? Is it possible to do this locally (http://localhost) rather than https://yourdomain? I think the certs aren't pulling because I don't have a domain?

xombiemp commented 8 years ago

If you only want to access things locally then you don't need an SSL cert and you don't need Apache reverse proxy. You'll still need Apache to host rutorrent, but for the other apps, you can just accesses them by their unique ports e.g. http://localhost:8989 for Sonarr. You'll need to modify the Apache config so that it just hosts rutorrent via http. Maybe something like this, but I haven't tested it:

<VirtualHost *:80>
    ServerName yourdomain.com
    DocumentRoot /var/www

    <Directory /var/www>
        Options -Indexes
    </Directory>

    <Location /rutorrent>
        Require valid-user
        AuthType form
        AuthFormProvider file
        AuthUserFile "/etc/apache2/passwd"
        AuthName "My Login"
        Session On
        SessionMaxAge 1800
        SessionCookieName session path=/
        SessionCryptoPassphrase CHANGEME
        ErrorDocument 401 /login.html
    </Location>

    <LocationMatch /rutorrent/(conf|share)>
        Require all denied
    </LocationMatch>

    <LocationMatch /logout$>
        SetHandler form-logout-handler
        AuthFormLogoutLocation /logout.html
        Session On
        SessionMaxAge 1
        SessionCookieName session path=/
        SessionCryptoPassphrase CHANGEME
        ProxyPass !
    </LocationMatch>

    <LocationMatch /\.(svn|git)>
        Require all denied
    </LocationMatch>
</VirtualHost>