 |
 |
Help with homepage?
|
 |
|
 |
|
Addicted to MacNN
Join Date: Sep 2002
Location: The northernmost capital of the world
Status:
Offline
|
|
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
|
|
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.
|
|
|
| |
|
|
|
 |
|
 |
|
Addicted to MacNN
Join Date: Sep 2002
Location: The northernmost capital of the world
Status:
Offline
|
|
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 
|
|
|
| |
|
|
|
 |
|
 |
|
Addicted to MacNN
Join Date: Sep 2002
Location: The northernmost capital of the world
Status:
Offline
|
|
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
|
|
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
|
|
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.
|
| |
|
|
|
 |
|
 |
|
Addicted to MacNN
Join Date: Sep 2002
Location: The northernmost capital of the world
Status:
Offline
|
|
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
|
|
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
|
|
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 <IfModule mod_alias.c> (around line 617...) but before </IfModule> (line 651 or so):
Alias /pictures "/Users/Shared/Pictures/"
<Directory "/Users/Shared/Pictures">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
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 <Directory> 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
|
|
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
|
|
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
|
|
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
|
|
|
| |
|
|
|
 |
|
 |
|
Moderator Emeritus 
Join Date: Mar 2001
Location: Austin, MN, USA
Status:
Offline
|
|
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.
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|