• Resolved Trondny

    (@trondny)


    Hi ! It seems that most people have the server at a hosting place and all problems here seems to be rlated to that. I have the server here at home, and I use NO-IP to port forwarding to my server. I have problem with the set up I understand. I have a lokal adress like this 192.168.1.12 and it work ok from my home. When I test the server from outside (http://www.webpagetest.org/) it loads very long more than 2 minutes. Then I change my url but now I cant log in again, but my site load ok from internet .

Viewing 6 replies - 1 through 6 (of 6 total)
  • Yes, most people use hosting to run their websites.
    There is a section here called “Localhost” which is about you type of setup.

    It would help us help you if you were to provide a link to your website.

    What is really important is that your web pages contain the correct website address in the context of your viewer’s web browser. This goes for the header css files, images files, in menu links. Without this the browser is unable to fetch the file contents.
    Have you done this ?

    Thread Starter Trondny

    (@trondny)

    Hi Thanks for answere.
    My url to homepange is http://eidskog.ddns.net
    I use portforwarding and it work ok I have port 80 open to the site.
    I can enter my site with http://192.168.1.12/wp-admin
    or http://hb1.lokal.net/wp-admin
    and all seems ok from inbond.
    But from outside on the internet it takes 2-3 minutes to load if testing withhttp://www.webpagetest.org/
    I use ssh from my pc to the server and ftp

    My /etc/hosts file look like this

    127.0.0.1 localhost
    127.0.1.1 HB1
    127.0.1.1 hb1.lokal.net hb1
    #127.0.1.1 eidskog.ddns.net hb1
    192.168.1.10 hb2.lokal.net hb2
    192.168.1.14 hb3.lokal.net hb3
    192.168.1.20 master-ubuntu.lokal.net master-ubuntu
    # The following lines are desirable for IPv6 capable hosts
    ::1 localhost ip6-localhost ip6-loopback
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters

    The server is HB1 and my computer is master-ubuntu

    Best regarrds Trond Nyløkken

    I loaded your page from: http://eidskog.ddns.net

    Here is the root of your problem, using my browser inspector (firebug), I see lots of lines in your page header like this:
    <link id="customizr-common-css" media="all" type="text/css" href="http://hb3.lokal.net/wp-content/themes/customizr/inc/assets/css/tc_common.min.css?ver=3.3.13" rel="stylesheet">

    My browser sees it and understands “Load a css file from: http://hb3.lokal.net/wp-content/themes/customizr/inc/assets/css/tc_common.min.css?ver=3.3.13
    And everything goes downhill from here!
    My browser has been given your local server name “hb3.lokal.net”, which makes perfect sense on your machine, this is a name in your hosts file, in the wider internet it means nothing, only “eidskog.ddns.net” has port forwarding etc.

    The solution is to change your “WordPress address” and “Site address” to “http://eidskog.ddns.net&#8221;. Then my browser will be able to find the css file and all the others too. (Note NO TRAILING “/”)
    Maybe for you to access it you will need to uncomment the “eidskog” line in your hosts file.

    AND you just have to install and use your own browser inspector.

    Congratulations, you have your site working.

    Would you please consider contributing to the community by describing the steps you needed.

    Is it now appropriate to mark this thread as resolved.

    Thread Starter Trondny

    (@trondny)

    Localy installation of wordpress.

    Most people who have described the installation of wordpress here has used external rent servers and these are not locally available. I have my server in the basement and it is connected my LAN. I remotely controls my server via ssh. Both server and client Pc have Ubuntu 14.04 operating system, but the server I have the server version without Graphical interface.
    The problem that arises when one does not have local dns server is that WordPress installation seen either just locally or only remotely, depending what you write in general settings for URL both should have http://eidskog.ddns.net in this case.
    The challenge will be when to install WordPress and server locally is that one has no Name Server locally and thus can not manage wordpress to distinguish local and internet. This I resolved to use local hosts files on both the server and client machine. I solved this by use hosts file on my client and on my server. The hosts file er at /etc/hosts I use the editor like this: sudo nano /etc/hosts to edit this file.
    On the client pc here (master-ubuntu) hosts file look like this

    The host file for my client computer look like this:
    127.0.0.1 localhost
    127.0.1.1 master-ubuntu.lokal.net master-ubuntu
    192.168.1.10 hb2.lokal.net hb2
    192.168.1.10 eidskog.ddns.net hb2

    My hostsfile for my webserver where wordpress is installed is:

    127.0.0.1 localhost
    127.0.1.1 HB2.lokal.net hb2
    127.0.1.1 eidskog.ddns.net hb2
    192.168.1.20 master-ubuntu.lokal.net master-ubuntu

    The ubuntu installation and wordpress installation is very good described here on this link
    I installed the software and i used this exelent page as leading for me: https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-on-ubuntu-14-04

    Thread Starter Trondny

    (@trondny)

    Yes I solved it now by changing my hosts file

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Local server and wp’ is closed to new replies.