• Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below
  • Forum
  • Website
  • GitHub
  • Status
  • Translation
  • Features
  • Team
  • Rules
  • Help
  • Feeds
User Links
  • Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below

    Useful Links Forum Website GitHub Status Translation Features Team Rules Help Feeds
    Jellyfin Forum Support Troubleshooting Networking & Access Apache proxy + htpasswd

     
    • 0 Vote(s) - 0 Average

    Apache proxy + htpasswd

    Apache proxy + htpasswd
    dabruck
    Offline

    Junior Member

    Posts: 4
    Threads: 1
    Joined: 2024 Dec
    Reputation: 0
    #5
    2025-01-24, 09:59 AM (This post was last modified: 2025-01-24, 10:44 AM by dabruck. Edited 1 time in total.)
    It's true @TheDreadPirate that changing the https port is a good way of preventing the vast majority of pests, well done!

    Finally I went through Apache's mod_session (https://httpd.apache.org/docs/2.4/en/mod...ssion.html).
    This way an authenticated user is validated by a specific cookie and not by an authorisation header.
    So it doesn't conflict with the jellyfin authentication header mechanism.

    I've tried unsuccessfully to get this to work from the Apache doc, but I always get strange behaviour and in the end something that doesn't work.

    I now use this conf https://github.com/buxxi/mod_auth_form-sample ...

    $ a2enmod auth_form request session session_cookie session_crypto
    $ cat /etc/apache2/sites-available/my-jelly.conf
    ...
    <Location "/">
    # IP
    Require ip ...
    # Auth
    AuthName "Secure area"
    AuthType form
    AuthFormProvider file
    AuthUserFile "/my/path/to/.htpasswd"
    ErrorDocument 401 /folder/login.html
    AuthFormLoginSuccessLocation "/folder/login.json"
    Session on
    SessionCookieName cookie_name path=/
    SessionMaxAge 14400 # seconds
    SessionExpiryUpdateInterval 10 # seconds
    SessionCryptoPassphrase passphraseofyourchoice
    Require valid-user

    Options None
    AllowOverride None
    </Location>

    <Location "/folder/">
    Require all granted # everyone must be able to access login
    </Location>

    ProxyPass /folder/ ! # do not proxyfy this URL

    If anyone has a cleaner and/or more secure solution with ‘mod_session’ I'd love to hear about it!
    « Next Oldest | Next Newest »

    Users browsing this thread: 1 Guest(s)


    Messages In This Thread
    Apache proxy + htpasswd - by dabruck - 2024-12-24, 09:36 AM
    RE: Apache proxy + htpasswd - by TheDreadPirate - 2024-12-24, 08:48 PM
    RE: Apache proxy + htpasswd - by dabruck - 2024-12-30, 11:33 AM
    RE: Apache proxy + htpasswd - by TheDreadPirate - 2024-12-30, 02:16 PM
    RE: Apache proxy + htpasswd - by dabruck - 2025-01-24, 09:59 AM
    RE: Apache proxy + htpasswd - by TheDreadPirate - 2025-01-24, 02:25 PM
    RE: Apache proxy + htpasswd - by dabruck - 2025-01-24, 02:49 PM
    RE: Apache proxy + htpasswd - by TheDreadPirate - 2025-01-24, 03:38 PM

    • View a Printable Version
    • Subscribe to this thread
    Forum Jump:

    Home · Team · Help · Contact
    © Designed by D&D - Powered by MyBB
    L


    Jellyfin

    The Free Software Media System

    Linear Mode
    Threaded Mode