• I remember in the past when your running an wordpress site at home, you made the following things.

    – Run a wordpress at localhost with port 51666 (my case. For other is 443/80) to reach the wordpress site.
    – This wordpress is hosted on my QNAP nas which have ip 10.0.0.201.
    – Open the port 51666 in my router with ip 10.0.0.201, so its accessible from outside.

    Normally i could reach WordPress in the past which those actions.

    But the wordpress from nowadays got 2 new things.

    Wordpress Adress (URL)
    and
    Site Adress (URL)

    I have a domain hosted (Only domain, no hosting package, since i do host my stuff alone).

    I made an CNAME in my DNS at my domain

    CNAME > site.oxize.nl > qnapox.myqnapcloud.com

    Myqnapcloud is isn MYDDNS which check constantly my public ip. So when my public changes, it does it automaticly.

    When i want to reach site.oxize.nl:51666, it goes to the dns which translate it again in my public ip and i can reach my site through that.

    But now here comes the problem.

    When i change those 2 new worpdress adresses to https://site.oxize.nl it totally locks me out of admin (when i using site.oxize.nl:51666), and all links/pictures are messed up.

    What is going wrong? Why cant we just use the old localhost to outside technic with a different port to connect to my site?

    • This topic was modified 2 years, 3 months ago by Oxizee.
    • This topic was modified 2 years, 3 months ago by Oxizee.
    • This topic was modified 2 years, 3 months ago by Oxizee.
Viewing 7 replies - 1 through 7 (of 7 total)
  • What do you enter as page URL before you enter https://site.oxize.nl? So what works for you?

    It would also be important that your host system itself knows the domain https://site.oxize.nl via the way “around”. You would have to make sure that the domain resolution on the localhost for this domain also goes through your external IP. Only then can all the WordPress processes that run in the background, for example, via wp-cron also work.

    Your constellation is btw. quite rare, I have not seen in the form for a very long time. Your requirement concerns rather your own network and not any setting on WordPress.

    It seems I have the same issue, or the same misunderstanding of the concept. At first I thought it was due to the theme, but it turns out to be on every theme.

    my setup:
    – 1 server (physical at home)
    – on that server I installed traefik as reversed proxy. Proxy-rules determine to which website you will go (on that same host using dockers)
    – On that same host, i run multiple dockers, each docker-container running its own website (all not WP sites, this issue is the first time i run a docker with WP that i want to install on this host)

    My docker-compose file exposes port 7008 (or whatever I would decide) to the docker at port 80
    I can now install and configure my website on private ip (https://172.16.0.5:7008) which works fine and everything looks great.
    Now, I want to publish the website to my domain, so i change the site-url to https://this.site.nl and the wordpress url the same..
    Result: All css files, images etc are still pointing to https://172.16.0.5:7008 . Manually change the values in the WP Database using SQL solves the image trouble (partially) but still the CSS is not working.

    I can reach the WP install by its internal IP on port 7008. On the domain name, i can reach it too, but no images, css files etc, and the admin fails to show correctly too.. (no matter what theme I use)

    my docker-compose.yml:
    ———————————————–

    version: '3.1'
    
    services:
    
      wordpress:
        image: wordpress
        restart: always
        environment:
          WORDPRESS_DB_HOST: db
          WORDPRESS_DB_USER: wp_user
          WORDPRESS_DB_PASSWORD: examplepass
          WORDPRESS_DB_NAME: exampledb
        volumes:
          - ./wordpress:/var/www/html
    
        labels:
          - "traefik.enable=true"
          - "traefik.http.routers.mywp.rule=(  Host(this.site.nl)"
    
        ports:
          - 7008:80
    
      db:
        image: mysql:5.7
        restart: always
        environment:
          MYSQL_DATABASE: exampledb
          MYSQL_USER: wp_user
          MYSQL_PASSWORD: examplepass
          MYSQL_RANDOM_ROOT_PASSWORD: '1'
        volumes:
          - ./db:/var/lib/mysql
    
    networks:
        default:
            external:
                name: proxy4

    Any pointers or help would be greatly appreciated!

    • This reply was modified 2 years, 3 months ago by moronnl.
    • This reply was modified 2 years, 3 months ago by moronnl.
    • This reply was modified 2 years, 3 months ago by moronnl.
    • This reply was modified 2 years, 3 months ago by moronnl. Reason: backticks in code didnt show correctly
    • This reply was modified 2 years, 3 months ago by moronnl.
    • This reply was modified 2 years, 3 months ago by moronnl.
    Thread Starter Oxizee

    (@oxizee)

    I remember you need to do something with the .htdocs. But even then. The new internal and External thing messes up internal links and admin. How do you proper set this from localhost to outside?

    I guess you mean htaccess, but what do you mean with “setting proper from localhost to outside?”

    Thread Starter Oxizee

    (@oxizee)

    normally in the past i remember you made a wordpress server on localhost (on some server), with any port, forwarded to 80 or 443. In .httaccess you needed to put something like you external ip or domain name. All that WordPress Adress (URL) and Site Adress (URL) stuff wasnt there in wordpress settings in the past. And it also didnt lock you out at that time.

    • This reply was modified 2 years, 3 months ago by Oxizee.
    • This reply was modified 2 years, 3 months ago by Oxizee.

    Ah ok, Well, I am just starting with wordpress locally (i used it at providers, hence I wanted to try and run it locally so I could test extensively before putting it online)

    My current route is : external IP on 80/443 forwards to (internal “DMZ” IP of) Proxy, and the proxy routes it internally to the correct “web-server” in the “proxy-vlan” (proxy4 in the docker-compose.yml), based on the rule (in this case rule=this.site.nl ).

    for the complete route: Internally I use the “internal DMZ address of the webserver” using port 7008, that connects to the docker-container where the WP site lives.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Publish from Internal to Public?’ is closed to new replies.