Local web server not being recognized

I setup a web server on my LAN specifically so both a PC and a Mac could use HTTP protocol and store and retrieve files. The servername is called UBUNTU. On any PC in the house I can type http://ubuntu/ and the directory listing appears. The Mac can not find it.

If I use the IP address, the server is recognized. The directory listing appears. And, when I use FTP in Terminal I can even get a file upload to work as long as the file is in the same directory I started the FTP. But, this Mickey Mouse will just not work for my application. What I want to do is schedule a daily upload of newly created music from the days work. If the producers did not like this Mac, I would trash it. I am so frustrated!

This is the first time I've used a Mac and so far I find it to be way overrated. I mean, how many computers can not access a web server out of the box? The Safari browser I am using has no trouble accessing the Internet but my "intranet" seems to baffle Safari. I would expect a problem if using SMB were a requirement. It is not - I simply want to use HTTP. How do I need to change the Mac configuration so that it works?

Posted on Jan 20, 2008 10:27 AM

Reply
15 replies

Jan 20, 2008 10:41 AM in response to magnetsa

did you try using ubuntu.local as the name instead?

Are you running a DNS server (BIND, Windows DNS, etc..?)?

Are you sure the mac is in the same workgroup as the other computers? IF its not then i dont think youll be able to rely on zeroconf to properly assign the dns name. To join the proper work group open Applications>Utilities>Directory Access. Choose SMB/CIFS, and set the workgroup name to whatever workgroup or domain the other machines are on.

Jan 20, 2008 4:33 PM in response to Anthony Cunningham

How do I tell the "Workgroup" name on a Linux box? I think that's a Windows convention isn't it? Samba isn't even needed.

My Windows PC's don't have any problem recognizing http://ubuntu/ or ftp://ubuntu/ as resources on our network.

I think the problem is a configuration problem on the Mac. I simply don't have the correct information on how to properly configure the Mac. I tried setting the search domains field to 'local' on the ethernet connection as someone suggested. That did not work even after I rebooted the Mac.

I tried both Safari and Firefox and neither recognizes the server name ubuntu in http://ubuntu/ or ftp://ubuntu/ nor do they recognize http://ubuntu.local/ or ftp://ubuntu.local/ .

I think the problem may have something to do with DNS and perhaps even a hosts file if the Mac uses such resources. I simply do not know. Can anyone help?

Jan 20, 2008 5:17 PM in response to magnetsa

Enable/configure the mDNS responder on the Ubuntu box, and/or tell the Mac to search the the DNS for .local addresses by adding local as per http://docs.info.apple.com/article.html?artnum=107800

After doing either of those things, you should be able to resolve http://ubuntu.local/

Failing all that, you can do the equivalent of a hosts file entry on the Mac as follows (a bit hazy, I'm not in front of a Mac at the moment):

Start NetInfo Manager (in /Applications/Utilities). This has tabs for users, hosts, etc. Add a host entry for your web server ("ubuntu") in the section called 'machines' (or maybe it's called hosts - something like that anyway). That will associate the name and IP address just like a hosts file entry, which is ok as long as that server's IP is static.

Hopefully it won't come to that and either starting mDNS on the Ubuntu box or making the search settings change as per that technote will make ubuntu.local resolve (and handle IP address changes without wasting more of your time in the future) automatically.

Jan 20, 2008 6:45 PM in response to Ted Harper

Thanks for your response. I had previously used the procedure specified in the http://docs.info.apple.com/article.html?artnum=107800 web page. I even rebooted. Still, neither Safari nor Firefox recognized ubuntu.local

Just had an idea to try. I'm going to use Terminal FTP and see if I can do an open on ubuntu or ubuntu.local Won't fill the need, but, perhaps it will give a clue to someone.

I didn't want to change anything on the Linux box since my PCs have no problem accessing ubuntu.

Also, the ubuntu web server does not have a static IP address.

Jan 20, 2008 10:45 PM in response to Ted Harper

OK, so I used NetInfo Manager and created an entry for a machine called ubuntu and I hardcoded the current dynamic IP address. (When I need to I will make a static IP address at a later time.)

So, I type in ftp://un:pwd@ubuntu/ and I get the directory I normally get on the PCs. (I didn't even have to do ubuntu.local) And, I then clicked on the directory (MUSIC2) and the songs I backed up there from the PCs showed. I was able to get a file to the desktop. All those functions I had been able to do before with the GUI interface.

So, far the only way I've been able to put a file on ubuntu from the Mac is by using FTP in the Terminal window.

So, the next question is how do I get the Mac to allow me to put a file on ubuntu from the GUI interface where I currently see the ubuntu file icons/names displayed?

Seems like the Mac gives me read permissions but not write permissions. I know the Linux server allows writes since the PCs have already written to the directory without problems.

Should I post this question elsewhere?

Jan 20, 2008 11:27 PM in response to BDAqua

You said, "the Finder/GUI only does Read, no Write, for that it's Terminal or a 3rd party FTP APP."

Are you kidding me? You've got to be joking?

Will others please confirm this insanity so that I can give BDAqua credit? I've been explaining the upload need going on two days and this is the first time this answer (even though I don't like it) has been stated.

I thought Mac was coming into the real world. And, I certainly thought Mac was in the modern world. And now BDAqua tells me that I have to go back a couple decades and use FTP in Terminal. I did that back in MSDOS days.

Jan 20, 2008 11:47 PM in response to magnetsa

Are you kidding me? You've got to be joking?


LOL, you'll not find many agreeing with me on very much, but on this point...

And, I certainly thought Mac was in the modern world.


In the modern world, ftp is considered very insecure, which it is!

If you want free look up CyberDuck or RBrowser, if you want done right, look into TransmitX.

http://www.applelinks.com/mooresviews/ftp.shtml

http://macosx.com/forums/mac-os-x-system-mac-software/43654-osx-ftp-client.html

Jan 21, 2008 12:12 AM in response to magnetsa

Okay, your original requirement (in this forum, and before it in the Safari one) was for browser/web access to an intranet web server. You've achieved that now, by putting in the Mac equivalent of a hosts file entry (which is fine - having the Mac search your DNS for the local addresses or running a mDNS responder on the intranet web server should have worked out for you, but didn't).

Now the hostname is getting resolved to the IP address, with the browser access to http://ubuntu/ what can you now not do? Was the requirement all along for FTP access to that machine (ie rather than accessing a HTTP-upload based service on that server - I thought from your earlier posts that trying FTP was just a diagnostic thing for yourself to confirm it was a DNS issue rather than a Safari one)? If so that's a new/different requirement I don't think anyone knew about until just now.

For FTP access, you'll need two things (1) the intranet DNS name resolution sorted out, which you now have done (if it resolves, it resolves, regardless of which app is asking for the lookup) AND (2) to use an FTP client; either Apple's provided command-line one or some third-party application (which a couple of alternatives that will work fine have been provided above).

I guess the part of the story that isn't clear from the posts here is why isn't your server just offering a shared folder (ie why is FTP in the picture at all)? Wouldn't that be easier and less moving parts involved? I have a Linux server here that my Macs and PCs all access shared folders on happily - again it just needs mDNS (or the Mac going to the DNS for local addresses or the IP address set up via Netinfo Manager as you have done), then you set up accounts on the server with appropriate permissions and you can drag/drop just fine from Finder, with no need for browsers, FTP, etc at all.

Sorry I'm just puzzled, but I guess if the requirement is clear you'll get some good advice from the folks in here...

Jan 21, 2008 1:01 AM in response to Ted Harper

The eventual goal is this:

1. All new files and updated files from PCs written to Linux server at a scheduled time when music producers are asleep (probably 6:00AM EST).
2. All new files and updated files from Mac written to Linux server at a scheduled time when music producers are asleep (probably 6:30AM EST).

Sorry for all of the confusion. I've never had to deal with a Mac. I do not know the terminology. I do not know the software. I do not know the OS. I generally do command-line Linux and MS Windows. And, I'm getting old and cranky.

(And, nothing in the computer business ever seems to be completed much less get better - so I get frustrated. Instead of mainframes, mini-computers, PCs and Macs talking the same languages, we have well over 100 programming languages and perhaps 50 variations of operating systems and thousands of utilities with their own abbreviated languages. It is a tower of babble worse than spoken and written human language.)

By a "shared folder" you mean you want me to use Samba on the Linux box? (Samba is already setup on the Linux box.) I do not want to have a shared folder on the PCs or the Mac. I only want the Linux directories to be read / write enabled and they are. So, is the next step configuring SMB correctly on the Mac? Perhaps that is what you or someone originally suggested? However, I've never been a supporter of Samba on Linux simply because the last Linux I used (not UBUNTU) did not play well with Samba when I last tried it (perhaps two years ago).

Jan 21, 2008 1:08 AM in response to Ted Harper

I looked back on the Safari forum and found:

Re: Safari access to web server located on LAN
Posted: Jan 20, 2008 9:27 AM in response to: Ted Harper
Click to reply to this topic Reply email Email

. . .

"I want to be able to define a web server that can be used by any browser on my Intranet to FTP files. And, once that is achieved, I want to create and schedule a job/task/whateveryouwanttocallit to upload newly created music files for backup purposes."

Now I don't feel I mislead you as bad as I thought I had.

Jan 21, 2008 2:44 AM in response to magnetsa

Okay thanks for re-posting that original explanation. I think it got lost (certainly for me) amongst all the sounds about how it should be so easy but just wasn't working, and you don't need a web server if what you want is an FTP server 😉

So, now you have the Mac resolving the address of the Linux box as it should be. That's good; web, FTP and anything else this side of carrier pigeons needs that to be sorted out first (aside: Maybe once the initial pain of this is forgotten, go back and see if you can get the DNS searching of local or mDNS working, to avoid the hardcoded server IP address on your Mac, but that can definitely wait for another day).

If you want a scheduled job to copy the files from the Mac to the Linux box, I think two reasonable options (and I'm sure lots of people will jump in here with more and better ones) are (1) use the command-line FTP client, or (2) mount a share on the file server and copy the files. In either case these can be scripted and scheduled (aside: I'm not sure, re-reading your original requirement for it to be done hands-off, why it matters if the Finder can/can't interactively FTP upload files to a server, because automating the finder or a web browser is a bit more problematic than automating an old-school command-line client just to push some files over your network to a server).

Back to where we are now, if it were me I'd just use samba on the Linux box (which you've checked is already working) to mount the drive onto the Mac, then it's just a trivial copy in a script. Less can go wrong that way than using FTP to achieve the same result.

To connect to a SMB share on your Linux server from the Mac, with the Mac's Finder open, choose Go/Connect to Server from the top menu. You get a window with a server address box. Into this type cifs://ubuntu/sharename (or smb://ubuntu/sharename) and it should prompt you for username/password for an appropriate account for that share, just like mapping the drive from a Windows client. If the account you connect with has read/write permissions on the shared folder you should be all good.

Jan 21, 2008 7:53 AM in response to Ted Harper

Im confused as to why one would use ftp to back up to a linux box when you have both rsync and scp at your disposal. both of which are alot easier to script from the shell... ****, if you use rsync it takes alot of the work of only copying the new/modified files.

Furthermore as BD said FTP is insecure and should be a LAST resort when it is the only thing available.

Jan 21, 2008 12:46 PM in response to Ted Harper

Thanks for all your help.

Oh well, the music producer using the Mac just installed Yummy and immediately did the uploads he wanted to do. Yummy also has a scheduling function so the Mac will be able to use Yummy on the producer's schedule. (I usually use FileZilla and had never heard of Yummy.)
---------------------------------------------------------------

Meanwhile, I was trying to get SMB working from the Mac but was never successful. As I mentioned earlier, I've never had success with Samba on Linux. This time was no exception. In this particular case, the Mac would not accept the username and password. I had specifically done smbpasswd -a username and used the same password and username that I had been using for FTP activity.

However, when I got to the Mac SMB/CIFS screen it demanded 3 things: workgroup, NAME and password. BUT, the name of the Mac box automatically appeared in the NAME field on that screen. If I tried changing that to the username, there was no success at all. So, I went to the Samba box and added the name of the Mac box as a username.

It was at that point that the producer told me he installed Yummy and was successful in uploading the music. I doubt he will let me have any more time on the Mac box for testing. I guess it is just as well since I had previously told him FTP was the way to go and SMB/CIFS was not something he had ever heard.
------------------------------------------------------------

Thanks for all your help.

Contrary to your opinion, I guess I feel that the most important things that happened in this exercise were, "the sounds about how it should be so easy but just wasn't working". I just hope folks from Apple, Microsoft and the Linux world stumble across these comments occasionally.

The bottom line is that the end user did not care how the job got done. The end user did not care what operating system nor what software technology was used. He just wanted the job done immediately. And, he had recalled a past experience where the Mac could not handle the job without a third-party FTP application.

Here's the future challenge for 3 programmers and 9 computers. Setup 3 rooms each with a PC, Linux, and a Mac box. Put a knowledgeable programmer from each of those separate worlds in each separate room. It's OK to have an Internet connection so they can get documentation. The task is to get scheduled uploads operational between all the boxes in each room without using 3rd-party software. I think a reasonable time would be far less than 10 minutes including verification tests between steps. Some folks might take most of that time just to read http://www.mattvanstone.com/2007/11/automatically-mounting-windows-smb-shares-in -ubuntu-v3/
so, perhaps the programmers' time is better spent on an FTP approach which might be more common setup and terminology among those three box types.

The winner gets his name on the resulting paper and website he creates to document how he made it so easy. The losers must come to his website each day for a year just to see his advertising.

Jan 21, 2008 3:49 PM in response to magnetsa

hahaaha... i think 10 minutes is ridiculous. I know MSCE's that cant even get an all windows network up and playing nince in that amount of time let alone throwing two other OSes and scripted backups into the mix.

That being said ive got a three way network going and running quite nicely. with centralized login. ID have user homes too if i had the capcity that that would benefit me. ID say it took me about 6 weeks to get it up and the bugs worked out. But now that ive done it i could probably do it in a couple days. Perhaps if i had to do it on a regular basis i could get that down to a few hours. But most likely not minutes. Ofcourse im not a network engineer either.. im jsut a web developer, hacker (in the old school sense) and graphic designer.

That said ive got my linux laptop and my g4 desktop rsyncing to my linux server (via cron jobs), and my windows box backing up to the same linux server over SMB useing a scheduled process.

That said i agree the end user rarely cares how it gets done (if they know better they generally do it themselves), but at the same time you should know the easiest way to set it up (rather, the easiest way you can figure for yourself to do it, hehe) if youre the consultant.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Local web server not being recognized

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.