WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] localhost home web server (10 posts)

  1. perra
    Member
    Posted 8 years ago #

    Ok, I have WP working on a home server and as long as I work on the host computer everything works fine. However, when I access WP from a remote machine on the network all css formatting is lost and the links include localhost/WPname instead of machinename/WPname uri's.

    I tested another directory within the httpd directory (e.g. apache manuals) which reflect the correct path, machinename/manuals and corresponding uri's.

    Haven't been able to figure it out.

    Platform: Windows XP Pro, Apache 2, MySql 4, Php 4, mod_rewrite loaded.

    Thanks in Advance.

  2. moshu
    Member
    Posted 8 years ago #

    In Options > General you set 2 URIs, those define where your blog is.
    If it is set to local - it cannot be on the internet: every machine that accesses it will "think" of 'localhost' as themselves :)

  3. chaaban
    Member
    Posted 8 years ago #

    maybe you can put the ip of your machine .

    when u run apache you can access (sometime you have to do some modifications) http//your-ip

    if u put this in your wordpress control panel (what moshu told you ) it might work .

  4. McShelby
    Member
    Posted 8 years ago #

    On WinXP you can also use the name of your workstation instead of localhost. By that you are able to access your local webserver from every Windows workstation inside your LAN.

  5. perra
    Member
    Posted 8 years ago #

    Replacing the ip address for the localhost in the Options > General worked (e.g. http//your-ip/WPname instead of http//localhost/WPname), Thanks All.

    Next, since the router is a dhcp server and randomly (dynamically) assigns the internal local ip address which can change at any time (e.g. on router reboot after reconfiguration of network machines and/or other hardware), which would be the best approach to solving this part of the configuration? Options:

    1. Through ip based virtualhost in the Apache httpd configuration file, e.g.

    #NameVirtualHost 192.168.1.XX

    #<VirtualHost 192.168.1.xx>
    ServerName Whatever
    DocumentRoot C:/WhereverApacheResides/htdocs
    #</VirtualHost>

    or

    2. Through name based virtualhost in the Apache httpd configuration file, e.g.

    #NameVirtualHost *:80

    #<VirtualHost *:80>
    ServerName Whatever
    DocumentRoot C:/WhereverApacheResides/htdocs
    #</VirtualHost>

    or

    3. Some other solution?

    Note: Directives commented out, just in case!!! For use they would need to be uncommented. (For other users getting started).

    Again, Thanks in Advance

  6. moshu
    Member
    Posted 8 years ago #

    How to set up a server is beyond the scope of the WP Forum. You could probably get better support for that in places that are specialized in server issues.

  7. perra
    Member
    Posted 8 years ago #

    Thanks Moshu for the previous help tips.

  8. perra
    Member
    Posted 8 years ago #

    Solution:
    These next pages provided a solution that worked for me in setting up virtual hosts. The last page includes a specific solution for WP. Hope it can help someone.

    Virtual hosting and PHP for local develpment
    http://techpatterns.com/forums/about405.html

    Apache Webserver :: MySQL etc.
    http://techpatterns.com/forums/forum-17.html

    Apache 2.0.50,PHP 4.3.8,mod_rewrite and WordPress 1.5????
    http://techpatterns.com/forums/about376.html

  9. moshu
    Member
    Posted 8 years ago #

    Thanks for posting back the solution.
    However, for the not-so-techie users I'd still recommend the installation of XAMPP for local development.

  10. Blade
    Member
    Posted 8 years ago #

    Thank you to you all, i was having problems with my localhost server and was searching for a simple easy to understand solution without luck, that is until i found this post in my search engine followed what moshu said about Options > general....realised my localhost port was blocked clicked a box and hey presto working perfectly(Shame i didnt find it 3 months ago) so i joined the site. Thanks again for a very helpful straight forward post :)

    Mick

Topic Closed

This topic has been closed to new replies.

About this Topic