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?

Are you trying http://xxx.xxx.xxx the IP address should be the IP address for the ubuntu server

… 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

I understand that I should type IP address of Ubuntu server on my WIn PC, but don’t know how find/set it.

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

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? :slight_smile: 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… :slight_smile: I hope there is some solution to all this, I just have to find it out :slight_smile: Probably there is some componnet that needs to be installed on the server to get everything runnin? :slight_smile:

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