Macintosh: saving file as shtml and SSI

A place to ask questions and get help. Be the first on your block to post ...

Macintosh: saving file as shtml and SSI

Postby caggens » Thu Jul 28, 2005 1:03 pm

:? I am new at this. I attended the template training several weeks ago and am now referring to the online training guide as I attempt to create a test page. When I go to save the page, I do not have shtml as an option for the extension, and there is no "Save as type" pull down menu, as was the case in the template training, so I cannot select Server-Side Includes. I typed in shtml as the extension but the test page does not display correctly at all. I have linked the style sheets to the file using design time but it still looks completely wrong.

How do I save the file as shtml and indicate that the file depends on Server-Side Includes on a Macintosh?
caggens
 
Posts: 65
Joined: Tue Jun 21, 2005 10:52 am
Location: RH 120

Postby saltybeagle » Thu Jul 28, 2005 5:15 pm

Heya,

Mac's are pretty smart in that they can handle files without extensions pretty well, unfortunately web servers have to be told the type of the file within the filename.
Manually typing in '.shtml' should be all that is needed, but since you've tried that and it still isn't working - there may be other issues.

Could you post the web address of the page you're working on?
Brett Bieber
Image
saltybeagle
 
Posts: 376
Joined: Fri Jan 16, 2004 3:10 pm
Location: 321 Admin

Page Posted

Postby caggens » Fri Jul 29, 2005 2:10 pm

Thank you for your helpful reply.

Now that the page is posted, it looks much better. When I view it with the browser on my local machine the fonts and layout do not display correctly.

I do have to type the entire URL (including .shtml) in order to find the file. Otherwise I get the "file not found" page.

The address is: http://www.unl.edu/art/testindex.shtml
caggens
 
Posts: 65
Joined: Tue Jun 21, 2005 10:52 am
Location: RH 120

Postby saltybeagle » Mon Aug 01, 2005 8:43 am

"When I view it with the browser on my local machine the fonts and layout do not display correctly."

My guess is that you were just loading the file through your browser and refering the file on your hard drive - and not through a localhost server?

You can set up a local webserver to test your files locally, but just viewing them as files through your browser won't work. They have to be sent through a web server before they will look right.

If you'd like to know how to setup a webserver on your machine we can help you with that. It's not very difficult.

Within your page everything looks alright - except for your sharedcode files:

Your testindex page is trying to reference those locally from:
macintoshhdtarget:christyaggens:documents:catestsitesharedcode

When it needs to be:
/art/sharedcode

Within Dreamweaver you should be able to run a 'find and replace' to fix the references... and that should get you all up and running.
Brett Bieber
Image
saltybeagle
 
Posts: 376
Joined: Fri Jan 16, 2004 3:10 pm
Location: 321 Admin

Postby caggens » Mon Aug 01, 2005 10:56 am

Thanks.

You are very helpful. I did the find/replace to correct the problem with the sharecode file.

I would be interested in being able to test pages locally through a server. What do I need to do to get that set up?
caggens
 
Posts: 65
Joined: Tue Jun 21, 2005 10:52 am
Location: RH 120

Postby saltybeagle » Wed Aug 03, 2005 9:08 am

Here's some basic instructions on setting up a server on your localhost -
this is assuming you're using a Mac with OS X 10.2 or later.

Your mac comes with the Apache webserver already installed on your machine. To turn it on, go to your System Preferences and choose the Sharing section under Internet & Network.
Inside Sharing there is a section for network services that can be turned on. Checking the box for Personal Web Sharing should turn on the webserver.

To test, open a browser and go to http://localhost/

If you see a web page with the Apache logo on it, you're golden.

Now that you have your local/test webserver running we need to do some additional setup for using the templates with them.
For the templates to work on your localhost, we need some additional template files that are on the server.

First create a directory/folder to store these files.
Through the finder open Library:WebServer:Documents and create a folder called 'unlpub'

Next, we need to copy some files into that directory... you can get these files from ftp://devgroup:spring2004@ucommdev.unl.edu/
(Clicking that link from within the Safari browser should mount the ftp site so you can access the files within the finder... if you aren't using or don't want to use Safari you can go to the finder and choose Go, Connect to Server, and type in ftp://devgroup:spring2004@ucommdev.unl.edu ).
Copy the templatedependents folder to the unlpub directory you just made on your machine. [NOTE: This step should be done periodically to update your localhost otherwise your pages could render different on your localhost than on your main server! Keep your files up to date!!!!]

In addition to having the files on your local hard drive, the apache webserver runs as a separate user which needs permission to read those files.

Through the finder, choose the /Library/WebServer/Documents/unlpub directory and select Get Info (Apple+i). Expand the Ownership and Permissions area and make sure that under the Details, Others (which the apache webserver would fall under) have 'Read Access'.... then choose Apply to enclosed items.

Now your local webserver ~should~ be ready for testing your files with the templates.
(http://localhost/unlpub/ should bring up a web page with one directory in it called templatedependents).

Now you can place your files in the local root and view them through your localhost address.
In case you haven't figured it out already, the root of your local webserver is the folder on your hard drive /Library/WebServer/Documents/ and anything you place in there will be served out on the Internet. For ease of use you can always type in the address 'localhost' to get to your local web site ---- but keep in mind this is a special web address that points to your (THE) local machine. Which means you won't be able to send someone an address like http://localhost/index.shtml , and have them take a look at your web page index.shtml. Externally accessible addresses are kinda outside the scope of what I'm trying to explain here, as this is to be used for local testing of the templates only.... if you're interesting in understanding more details about setting up publicly accessibly website, chat with someone about it.

Anyways, now that we've got your machine set up for testing the templates now let's move on to Dreamweaver:

For instance, say I'm working on the http://www.unl.edu/webdevnet/ site.
Within Dreamweaver my Site is configured to locally store my files in the directory /Library/WebServer/Documents/webdevnet/
(http://localhost/webdevnet/)
and my remote site is set up with my logon information to store my files in
html/
(http://www.unl.edu/webdevnet/)

So now I can test my file index.shtml by going to http://localhost/webdevnet/index.shtml and once I have it ready, I'll put it to the server and it will be live as
http://www.unl.edu/webdevnet/index.shtml


Did it work? :?:

Now, there may be some additional details I've forgotten about the default configuration of Apache, and some manual configuration we need to do... if this doesn't work, let me know and I'll revise this with the additional details needed.
(mime.types, adding .shtml? Options +Includes? can't quite remember as it's been a while)... Good luck.

As always, if anyone has additional comments please share.
Last edited by saltybeagle on Thu Aug 04, 2005 9:15 am, edited 1 time in total.
Brett Bieber
Image
saltybeagle
 
Posts: 376
Joined: Fri Jan 16, 2004 3:10 pm
Location: 321 Admin

Postby caggens » Wed Aug 03, 2005 2:06 pm

Thanks for the info.

I followed the steps but it did not work.

I do see the Apache logo when I go to http://localhost/

I was not able to access the templatedependents folder by connecting to the server via the finder because my username and password would not work to access the location.

I was able to access the templatedependents folder using Safari and the link you provided, and I copied the files to my new unlpub folder.

I moved the local root folder from My Documents to Library:WebServer:Documents and changed the local root folder location in Dreamweaver under Manage Site.

When I view the page through the browser, it looks the same as before I made the changes.

Any ideas?
caggens
 
Posts: 65
Joined: Tue Jun 21, 2005 10:52 am
Location: RH 120

Postby saltybeagle » Wed Aug 03, 2005 2:21 pm

Do you know the IP address of your machine?

You can find out by going into the System Preferences under the Network section. It should say something like "Built-in Ethernet ...... the IP address 129.93..."

If you have that I can take a look at what's happening.... this is probably one of those additional steps I was worried about.

2-1598
Brett Bieber
Image
saltybeagle
 
Posts: 376
Joined: Fri Jan 16, 2004 3:10 pm
Location: 321 Admin

Postby saltybeagle » Thu Aug 04, 2005 9:13 am

OK...

Here's the first part of my instructions that went wrong: The webserver can't read the files we copied over into the unlpub directory.

The apache webserver runs as a separate user, which also needs permission to read the files off of your hard drive.

Through the finder, choose the /Library/WebServer/Documents/unlpub directory and select Get Info (Apple+i). Expand the Ownership and Permissions area and make sure that under the Details, Others (which the apache webserver would fall under) have 'Read Access'.... then choose Apply to enclosed items.

Then let's see if that makes a difference... I've revised the above instructions in case anyone else is following along.
Brett Bieber
Image
saltybeagle
 
Posts: 376
Joined: Fri Jan 16, 2004 3:10 pm
Location: 321 Admin

Postby caggens » Fri Aug 05, 2005 3:45 pm

Thanks for all of your help Brett.

I think I am just going to put the files on the server to view them accurately after all. Also, I'll be out of the office for two weeks, so I won't be working on this for a while. I'm sure I'll have more questions when I get back, and when I do I will post them.

Thanks again.

Christy
caggens
 
Posts: 65
Joined: Tue Jun 21, 2005 10:52 am
Location: RH 120


Return to Help & Assistance

Who is online

Users browsing this forum: No registered users and 2 guests

cron