SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Member
    Join Date
    Aug 2010
    Location
    London
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to access Ubuntu Server from local PC?

    Hi all,

    Today I installed my first web server, which is Ubuntu 12.04 LTS. I got Apache, PHP and MySql working, there is even MyPHPAdmin! Everything is working fine on that PC, but the problem is that I have no idea how to connect to this server from my PC. Just to clarify- I got one PC that I work on and got another one, which has Ubuntu Server running. I even managed to connect them through the router, which I made to work as a switch. I can see the Ubuntu Server on my Windows PC in "Network", but it's empty, I can't see any files. I tried to share a folder etc/www on Server, but it shows an error saying something about right, that I'm not this folder's owner. I guess I'm not doing the right thing at all, am I? Even if I could see shared folder on my Windows PC- I would still be not able to type "somedomain.com" on Windows PC and access for example index.php or MySql database. So, the question is- how do I configure Ubuntu Server to be accessible from Windows PC?

  2. #2
    From space with love silver trophy
    SpacePhoenix's Avatar
    Join Date
    May 2007
    Location
    Poole, UK
    Posts
    4,998
    Mentioned
    100 Post(s)
    Tagged
    0 Thread(s)
    Are you trying http://xxx.xxx.xxx the IP address should be the IP address for the ubuntu server
    Last edited by spikeZ; Sep 2, 2012 at 00:57.
    Community Team Advisor
    Forum Guidelines: Posting FAQ Signatures FAQ Self Promotion FAQ
    Help the Mods: What's Fluff? Report Fluff/Spam to a Moderator

  3. #3
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,644
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    ... and it needs to be either a valid IP address (publicly accessible via the Internet) OR you must edit your WinDoze hosts file to point to the Ubuntu box.

    You did, of course, update the same file on the Ubuntu box so it knows that it needs to respond to xxx.xxx.xxx.xxx requests as well as 127.0.0.1 requests for the "localhost domain."

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator

  4. #4
    SitePoint Member
    Join Date
    Aug 2010
    Location
    London
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by SpacePhoenix View Post
    Are you trying http://xxx.xxx.xxx the IP address should be the IP address for the ubuntu server
    I understand that I should type IP address of Ubuntu server on my WIn PC, but don't know how find/set it.

  5. #5
    SitePoint Member
    Join Date
    Aug 2010
    Location
    London
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by dklynn View Post
    ... and it needs to be either a valid IP address (publicly accessible via the Internet) OR you must edit your WinDoze hosts file to point to the Ubuntu box.

    You did, of course, update the same file on the Ubuntu box so it knows that it needs to respond to xxx.xxx.xxx.xxx requests as well as 127.0.0.1 requests for the "localhost domain."

    Regards,

    DK
    What is a WinDoze file and how do I edit it?

  6. #6
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,644
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    Rolandas,

    The "WinDoze hosts file" is located at c:\Windows\system32\drivers\etc\hosts and you edit it with a text editor (hopefully better than Notepad). If you're on a Vista or Win7 box, you'll need to Run As Administrator the text editor to be able to save it.

    The Ubuntu box will be on your LAN - look for it using your WinDoze box or get into the settings of the 'Nix box!

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator

  7. #7
    SitePoint Member
    Join Date
    Aug 2010
    Location
    London
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by dklynn View Post
    Rolandas,

    The "WinDoze hosts file" is located at c:\Windows\system32\drivers\etc\hosts and you edit it with a text editor (hopefully better than Notepad). If you're on a Vista or Win7 box, you'll need to Run As Administrator the text editor to be able to save it.

    The Ubuntu box will be on your LAN - look for it using your WinDoze box or get into the settings of the 'Nix box!

    Regards,

    DK
    Yeah, I know about the hosts file, I have to enter domain and there my browser takes me when I enter that domain, this part is cool. Was playing with the server all day yesterday, but coul'd find how to connect to it using MySQL Workbench on my Win PC. I installed this program on Ubuntu, everything works fine, I can access database using MySQL Workbench or straight through PHPMyAdmin. But what's the point in having a server if you can't access it from another PC? :) I have a web hosting with JustHost, also dedicated hosting with another company and the main thing is that you can connect to the server though FTP and maanage your database, I'm kind of confused with Ubuntu here, I thought a Server should do what it at least has to do.. :) I hope there is some solution to all this, I just have to find it out :) Probably there is some componnet that needs to be installed on the server to get everything runnin? :)

  8. #8
    Foozle Reducer ServerStorm's Avatar
    Join Date
    Feb 2005
    Location
    Burlington, Canada
    Posts
    2,699
    Mentioned
    89 Post(s)
    Tagged
    6 Thread(s)
    Quote Originally Posted by Rolandas View Post
    Yeah, I know about the hosts file, I have to enter domain and there my browser takes me when I enter that domain, this part is cool. Was playing with the server all day yesterday, but coul'd find how to connect to it using MySQL Workbench on my Win PC. I installed this program on Ubuntu, everything works fine, I can access database using MySQL Workbench or straight through PHPMyAdmin. But what's the point in having a server if you can't access it from another PC? I have a web hosting with JustHost, also dedicated hosting with another company and the main thing is that you can connect to the server though FTP and maanage your database, I'm kind of confused with Ubuntu here, I thought a Server should do what it at least has to do.. I hope there is some solution to all this, I just have to find it out Probably there is some componnet that needs to be installed on the server to get everything runnin?
    Rolandas,

    As your two machines are not set under a domain controller then the Ubuntu Server will not automatically grant access to those servers that can see it. There are a number of ways that you could do this:
    1. You could start the SSH demon on the Ubuntu server (making sure that you set it to start on reboot) and then connect using filezilla.
    2. You could ensure that Samba is installed and configured on the Ubuntu box. Samba allows you to create Windows Shares. So once you have it running you can click a folder in Ubuntu and say 'Share This Folder'. So you might share your /var/www folder. You would then be able to browse to that shared folder from your Windows machine.


    On the Ubuntu machine I would make sure you have downloaded and installeed WebMin. This has a GUI module for managing MySQL and in this you will need to set:
    • Under 'MySQL Database Server -> User Permissions': You want to create a user such as root from your Windows host and grant this user full permissions to all the databases
    • Under ''MySQL Database Server -> Database Permissions': You want to grant all permissions to your Windows host
    • Under ''MySQL Database Server -> Host Permissions': You want to set 'Any' database from your Windows host
    • Under 'MySQL Server Configuration': You want to change the MySQL Server Listening Address from '127.1.0.0' to 'Any'.
    • When completed these steps, 'MySQL Database Server': Select 'Stop MySQL Server' and the 'Start MySQL Server'
    • If you've chosen the option in Workbench to connect to a host over SSH you need to ensure that the SSH server/daemon is running on the Ubuntu server; otherwise there is nothing to handle this your SSH requests.
    • Then try to connect from Workbench on your Windows machine




    Regards,
    Steve
    ictus==""


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •