Welcome to WebmasterWorld Guest from 22.214.171.124
One thing you can do, is install and setup Apache for windows, and Activestates Perl for Windows. Then do your submissions from the home machine instead of your server. That is what I do, but since I'm on dsl most of the time, it makes no difference.
For the the record my Perl is located in
In your \apache©onf directory there is a file "httpd.conf". Make a quick backup of that file to something like "httpd.conf.bak" just in case.
Now open the "httpd.conf" file up in an editor. Scroll down to the line that says "ServerName" and put in localhost:
Now lets make sure Apache works.
Start apache. Execute apache.exe.
>start >run c:\apache\apache.exe
It should open a window showing you it is running. Just minimize the window.
Open your browser and type in the address:
You should get a page saying "it worked".
shut down apache with:
Think k for kill.
Now lets go do some more configuring.
Open back up httpd.conf and edit these lines:
point that at the root of your website. At this point I should mention, that you should have your offline website setup Identical to your online website. For instance, my root directory here on this server is /www/searchengineworld/. So on my home box, I have those two directories setup and the remainder of the site is a perfect file and directory match to what I have here.
My documentroot line on apache reads:
(remember this is a unix program really, use foreslashes instead of backslashes in directories). So, set the documentroot to match your setup.
Right under the document root section of the httpd.conf file is a section on setting directories. Use this for now:
And also add this (replace the /a1/web with your document root directory)
Allow from all
Next, add this line about half way down the httpd.conf file somewhere: (there is a section on scripts, look for it)
AddHandler cgi-script .cgi
or whatever you need for scripts to match your own webserver.
You'll probably want server side includes at some point, so enabled them with:
AddType text/html .htm
AddHandler server-parsed .htm
AddType text/html .shtml
AddHandler server-parsed .shtml
Those lines can go under the line that reads something like: # To use server-parsed HTML files
that one. (sorry, I don't have a stock httpd handy).
That should give you enough to get going. Save the file and see if you can start apache and browse some files from your "webserver" by using "httpd://localhost" again.
Lets stop there and see if you have caught your breath...
When we get it all up and running smoothly, you will not only have cgi's offline but a perfect mirror of your online site. That way you can make all kinds of changes by viewing the pages in your browser right off the hard drive. Edit a file, a couple of clicks and a browser reload to view it.
Surf your entire site without firing up a modem - speed, creativity, there isn't anything like running a webserver offline to give your page production a big kick.
I am assuming exactly as it is on my host so cgi's won't have to be changed but just making sure.
Also when you say to put [localhost...] do you mean exactly thet or do you mean to put something that my pc would be called. Again I am assuming you want that exactly but I am just making sure.
One last thing. I have perl in C:\Perl and apache in folder C:\Apache
Does the folder home (which will be the root of and contain my whole site need to go into the folder apache or can it be in my documents?
Yes, go for a mirror of the exact paths/directories as your sites. I have another site on another host that lives at:
So I have a directory "c:\a1\Web\showcase\phdss"
Yes, exactly "http://localhost". That tells windows to look for the file from a local web server. (we will get to the naming part of how you can use "http://www.yourdomain.com" in a bit. We just need to get everything working first before going for the gold.
Again, the trick is to match your website perl location. That first line of everyperl program "#!/usr/bin/perl" is the local of perl on your server. You *really* want your local perl to match that. In other words, install perl on your machine at "c:\usr\bin" or "c:\usr\local\bin" which ever matches your online web host.
When you select to install perl, just select that directory for the installation location, and then you will end up with "\usr\bin\perl" for a "shabang line" (the first line of every perl program). If you do that (install perl in \usr\bin or \usr\local\bin), you'll never have to edit a script to run local or on your web server -they'll be identicle.