Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Help with homepage?

Help with homepage?
Thread Tools
Addicted to MacNN
Join Date: Sep 2002
Location: The northernmost capital of the world
Status: Offline
Reply With Quote
Dec 5, 2002, 05:46 PM
 
Hope this is the right forum.....

OK here's the deal. I'm setting up a basic website at home on my iMac(jaguar). I want to create a link to /Users/Shared/Pictures. How do I do that and is it possible? I don't want to store everything I got in /webserver.

I have two accounts for me and my girlfriend on my mac and one for my friends to use for ftp transfer. I would like to be able to set up a page with thumbnails of my pics so people would be able to browse the pics before d/l.

I'm using BBedit and nothing else. I know very little about HTML editing so any help would be great.

And don't be shy to tell me you don't understand what I'm asking if it's not clear

Thanks
     
Mac Elite
Join Date: Mar 2001
Location: somewhere in ohio
Status: Offline
Reply With Quote
Dec 5, 2002, 06:02 PM
 
If you have a static IP address (meaning that your mac is always on and the IP # never changes), you can link to: http://123.45.678/~username/Pictures/; where 123.45.678 is your IP# and ~username is your home directory.
     
Logic  (op)
Addicted to MacNN
Join Date: Sep 2002
Location: The northernmost capital of the world
Status: Offline
Reply With Quote
Dec 5, 2002, 06:06 PM
 
Well I don't have a static IP address but I fixed that with No-IP it works fine for FTP.

Thanks I'll try that
     
Logic  (op)
Addicted to MacNN
Join Date: Sep 2002
Location: The northernmost capital of the world
Status: Offline
Reply With Quote
Dec 5, 2002, 06:24 PM
 
Hmmm, I think I'm doing something wrong.

The pics I want to show are here Users/Shared/Pictures/Photos/

Then I should do this: href="http://xxx.xxxxx.xxx/~Users/Shared/Pictures/Photos/">name of link</


Or am I doing something wrong? it doesn't work so I think it's wrong.
     
Mac Elite
Join Date: Mar 2001
Location: somewhere in ohio
Status: Offline
Reply With Quote
Dec 5, 2002, 06:43 PM
 
Originally posted by Logic:
Hmmm, I think I'm doing something wrong.

The pics I want to show are here Users/Shared/Pictures/Photos/

Then I should do this: href="http://xxx.xxxxx.xxx/~Users/Shared/Pictures/Photos/">name of link</


Or am I doing something wrong? it doesn't work so I think it's wrong.
I'm not sure, but I don't think you can directly link to your main Users folder. I think it has to be in a user directory, like your username or someone else's.
     
Posting Junkie
Join Date: Mar 2001
Location: Salamanca, EspaƱa
Status: Offline
Reply With Quote
Dec 5, 2002, 06:44 PM
 
This is out of my league.

I don't know anything about web development.

Feel free to ask me about things regarding IRC, the Terminal or non-networking related things
I could take Sean Connery in a fight... I could definitely take him.
     
Logic  (op)
Addicted to MacNN
Join Date: Sep 2002
Location: The northernmost capital of the world
Status: Offline
Reply With Quote
Dec 5, 2002, 06:56 PM
 
Originally posted by KaptainKaya:


I'm not sure, but I don't think you can directly link to your main Users folder. I think it has to be in a user directory, like your username or someone else's.
Hmmmm.......

That creates some difficulties. Because me and my girlfriend have two different accounts I have put most of the things like pics, iTunes library and such in the Shared folder. My friends also have access to that trough my ftp server. So it would cause a lot of trouble(and HD space, I got a 20GB iMac) to have everything duplicated on our accounts.

If you think of anything or know anyone that could know about these things please let me know

I'm kind of new to these HTML and such so I really can't think of anything.
     
Forum Regular
Join Date: Aug 2002
Location: Cascadia
Status: Offline
Reply With Quote
Dec 5, 2002, 10:04 PM
 
Here's a solution I found, and hopefully it's not too daunting.

Files for the computer's main webserver are located in /Library/WebServer/Documents/. So you could place files there and they would show up fine. However, to get exactly what you want, you can create a symbolic link pointing to the Shared folder. Copy and paste the following command into the terminal and you'll be set:

ln -s /Users/Shared/ /Library/WebServer/Shared

Then, to get to a randomfile.html in the Shared folder, you would type http://xxx.xxx.xxx.xxx/Shared/randomfile.html.
(Last edited by derien; Dec 5, 2002 at 10:14 PM. )
     
Forum Regular
Join Date: Jun 2002
Location: New York
Status: Offline
Reply With Quote
Dec 6, 2002, 12:01 PM
 
Although there are simpler ways of resolving your problem, I'll mention the most sophisticated/legit method just to give you another option.

Open your Apache configuration file (/etc/httpd/httpd.conf) by typing sudo emacs /etc/httpd/httpd.conf and entering your account password.

Add the following lines after &lt;IfModule mod_alias.c&gt; (around line 617...) but before &lt;/IfModule&gt; (line 651 or so):

Alias /pictures "/Users/Shared/Pictures/"

&lt;Directory "/Users/Shared/Pictures"&gt;
Options Indexes MultiViews
AllowOverride None
Order allow,deny
allow from all
&lt;/Directory&gt;

Press Ctrl-X, Ctrl-C, and finally y to save these changes.

What's happening here? The first directive routes requests to http://myserver/pictures/ to the /Users/Shared/Pictures/ directory. If you have some.jpg in /Users/Shared/Pictures/ourvacation/, you can access it on the web at http://myserver/pictures/ourvacation/some.jpg

The &lt;Directory&gt; code block makes the /Users/Shared/Pictures accessible to Apache and web users. The first line allows directory listings (the contents of the directory will be shown if there is no index page in it). The second prevents the delegation of authority to lesser configuration files. The next two lines allow anyone to view the webpages in that directory.

Good luck,

Peter
     
Forum Regular
Join Date: Jun 2002
Location: New York
Status: Offline
Reply With Quote
Dec 6, 2002, 12:12 PM
 
Originally posted by derien:
ln -s /Users/Shared/ /Library/WebServer/Shared
Uhh, how about ln -s /Users/Shared/ /Library/WebServer/Documents/Shared instead?

This works, but it's on the inelegant side in my opinion.

Peter
     
Forum Regular
Join Date: Aug 2002
Location: Cascadia
Status: Offline
Reply With Quote
Dec 6, 2002, 03:44 PM
 
Originally posted by SPiNdustrious:


Uhh, how about ln -s /Users/Shared/ /Library/WebServer/Documents/Shared instead?

This works, but it's on the inelegant side in my opinion.

Peter
Ah, true about the path. I believe I had another error before and forgot the Documents/ when I corrected it.

However, I hardly agree that this solution is inelegant. It's perhaps not ideal if you are operating an industrial-strength webserver, but I hardly think that's the case here. If simplicity is the measure of elegance, then I would guess a single command measures well against altering the Apache configuration.
     
Forum Regular
Join Date: Jun 2002
Location: New York
Status: Offline
Reply With Quote
Dec 6, 2002, 04:39 PM
 
I came on too strong. "Inelegant" was also a poor choice of words. I was wrong to criticize so quickly. I apologize.

Softlinking is probably the simplest and most direct solution; adding an Alias and a Directory to httpd.conf is probably the most powerful.

It all comes down to what one needs out of a web server and to what degree one likes to tinker.

Peter
     
Xeo
Moderator Emeritus
Join Date: Mar 2001
Location: Austin, MN, USA
Status: Offline
Reply With Quote
Dec 8, 2002, 04:03 AM
 
A simple PHP script can display all your pictures for you as they are added. That's what I do. I premake the thumbnails, though, but even if you didn't want to do that, you don't have to. There are way s to resize images dynamically.

It all comes down to how far you wish to go.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 06:26 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2