Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Support
  3. Persistent custom nginx configuration

Persistent custom nginx configuration

Scheduled Pinned Locked Moved Support
reverseproxy
7 Posts 5 Posters 1.2k Views 6 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • O Offline
    O Offline
    opensourced
    wrote on last edited by girish
    #1

    I would find it very useful if i could enter custom nginx rules (generally or per application), that would survive updates. Is this possible at the time beeing?

    1 Reply Last reply
    1
    • nebulonN Offline
      nebulonN Offline
      nebulon
      Staff
      wrote on last edited by
      #2

      Generally we try to not expose such internals to the users, as they are inherently hard to test with regards to updates. Often though we can add a feature to "manage" such thing explicitly. What is the use-case for you and what would you like to add?

      O LatinosnctvL 2 Replies Last reply
      0
      • nebulonN nebulon

        Generally we try to not expose such internals to the users, as they are inherently hard to test with regards to updates. Often though we can add a feature to "manage" such thing explicitly. What is the use-case for you and what would you like to add?

        O Offline
        O Offline
        opensourced
        wrote on last edited by
        #3

        @nebulon See that point. Two use cases are:

        WordPress exposes the example.com/xmlrpc.php API per default. We already had several issues where attackers used those APIs to send spam mails from our applications. To fix this issue, either you need to install a plugin that disables the API (however, dose plugins which are available for free are crapy and I dont trust them), or you just disable those requests in the nginx.conf of the application. This is what I did, but through updates those custom lines were deleted.

        I would like to restrict the Synapse Admin API to certain IPs.

        nebulonN jdaviescoatesJ 2 Replies Last reply
        1
        • O opensourced

          @nebulon See that point. Two use cases are:

          WordPress exposes the example.com/xmlrpc.php API per default. We already had several issues where attackers used those APIs to send spam mails from our applications. To fix this issue, either you need to install a plugin that disables the API (however, dose plugins which are available for free are crapy and I dont trust them), or you just disable those requests in the nginx.conf of the application. This is what I did, but through updates those custom lines were deleted.

          I would like to restrict the Synapse Admin API to certain IPs.

          nebulonN Offline
          nebulonN Offline
          nebulon
          Staff
          wrote on last edited by
          #4

          @opensourced I think the WordPress issue can be solved with a htaccess file instead of doing this on a reverse proxy level https://docs.cloudron.io/apps/wordpress-developer/#htaccess

          1 Reply Last reply
          3
          • nebulonN nebulon

            Generally we try to not expose such internals to the users, as they are inherently hard to test with regards to updates. Often though we can add a feature to "manage" such thing explicitly. What is the use-case for you and what would you like to add?

            LatinosnctvL Offline
            LatinosnctvL Offline
            Latinosnctv
            wrote on last edited by
            #5

            @nebulon Hello, I edited the nginx config manually on the server... to restrict access to chatwoot's super_admin url... but when I change the config in the app, everything added disappears

            location ^~ /super_admin {
                allow 1.2.3.4;
                deny all;
                proxy_pass http://CHATWOOT_INTERNAL_INSTANCE_IP:3000;
            }
            
            girishG 1 Reply Last reply
            0
            • LatinosnctvL Latinosnctv

              @nebulon Hello, I edited the nginx config manually on the server... to restrict access to chatwoot's super_admin url... but when I change the config in the app, everything added disappears

              location ^~ /super_admin {
                  allow 1.2.3.4;
                  deny all;
                  proxy_pass http://CHATWOOT_INTERNAL_INSTANCE_IP:3000;
              }
              
              girishG Offline
              girishG Offline
              girish
              Staff
              wrote on last edited by
              #6

              @Latinosnctv Currently, adding custom nginx configs is not supported. I am not 100% sure, but if you use a WAF (like cloudflare), you can add rules there.

              1 Reply Last reply
              0
              • O opensourced

                @nebulon See that point. Two use cases are:

                WordPress exposes the example.com/xmlrpc.php API per default. We already had several issues where attackers used those APIs to send spam mails from our applications. To fix this issue, either you need to install a plugin that disables the API (however, dose plugins which are available for free are crapy and I dont trust them), or you just disable those requests in the nginx.conf of the application. This is what I did, but through updates those custom lines were deleted.

                I would like to restrict the Synapse Admin API to certain IPs.

                jdaviescoatesJ Offline
                jdaviescoatesJ Offline
                jdaviescoates
                wrote on last edited by
                #7

                @opensourced said in Persistent custom nginx configuration:

                plugins which are available for free are crapy and I dont trust them

                fyi Wordfence is not crappy (imho everyone running WordPress should install it) and would easily sort this for you

                I use Cloudron with Gandi & Hetzner

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Bookmarks
                • Search