UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    NGINX web server on Libertine, it works :-)

    Scheduled Pinned Locked Moved Libertine
    4 Posts 3 Posters 1.1k Views 1 Watching
    Loading More Posts
    • 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.
      • Br1B Offline
        Br1
        last edited by Br1

        It's in autostart (static web page) and works even when the screen is off : http://libertine.ddns.net:88

        As far as I know, the ip address provided by mobile network operators usually does not allow to host a site, I used the static ip of my vpn (openvpn installed on my vps) so when my Xiaomi is connected to my vpn (is disconnected only when I it use as a hotspot) site will be online.

        ^

        • Google Pixel 3a XL
        • Xiaomi MI A2
        E arubislanderA 2 Replies Last reply Reply Quote 2
        • E Offline
          Emphrath @Br1
          last edited by

          @br1 Wow !! How cool is that !

          1 Reply Last reply Reply Quote 0
          • arubislanderA Offline
            arubislander @Br1
            last edited by

            @br1 care to give more details so others could replicate your success?

            πŸ‡¦πŸ‡Ό πŸ‡³πŸ‡± πŸ‡ΊπŸ‡Έ πŸ‡ͺπŸ‡Έ
            Happily running Ubuntu Touch
            JingPad (24.04-1.x daily)
            OnePlus Nord N10 5G (24.04-2.x daily)
            PinePhone OG (20.04)
            Meizu Pro 5 (16.04 DEV)

            Br1B 1 Reply Last reply Reply Quote 1
            • Br1B Offline
              Br1 @arubislander
              last edited by

              @arubislander I describe in broad outline ...

              relative to vps/vpn (which allows you to have an ip reachable) it is set to redirect the requests received on port 88 to a specific vpn client (my xiaomi) and vice versa (there are 2 iptables rules)

              regarding the auto start of nginx, in upstart :

              description "Libertine - start nginx"
              start on started unity8
              exec /home/phablet/.aa_myscripts/nginx.sh
              

              nginx.sh :

              #!/bin/sh
              sleep 3 ; sudo chroot /home/phablet/.cache/libertine-container/mylinux/rootfs /bin/bash -c "./startup.sh"
              

              in libertine root : startup.sh

              #!/bin/sh
              service nginx start
              

              one more thing, due to dns changes I've made I could no longer install any program (from gui or libertine-container-manager) so i used chroot, I have reset dns, installed and configured nginx without any particular problems ... do you have more specific questions ?

              ^

              • Google Pixel 3a XL
              • Xiaomi MI A2
              1 Reply Last reply Reply Quote 0
              • ikozI ikoz referenced this topic on

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better πŸ’—

              Register Login
              • First post
                Last post