Apache question from a newbe
I have to develop some html-perl scripts to run on apache. I want to test them out so I used yast to install apache2. I have spent all day trying to find where I put the file index.html to get it to run. I have read the FAQ's and I still can't find out how to point-to or where to install the index file to get it to run. Has anyone got this to work? If so how do I get my scripts to run. Please! Bob Rawlinson
On Saturday 22 January 2005 2:31 pm, Robert A. Rawlinson wrote:
I have to develop some html-perl scripts to run on apache. I want to test them out so I used yast to install apache2. I have spent all day trying to find where I put the file index.html to get it to run. I have read the FAQ's and I still can't find out how to point-to or where to install the index file to get it to run. Has anyone got this to work? If so how do I get my scripts to run. Please! Bob Rawlinson
Simplest thing is to throw it into ~/public_html Then you can view it via http://localhost/~<username>/ Where <username> is your login name. Alternatively, /srv/www/htdocs/ is the default location unless you have messed with any of the /etc/apache2 config files. Scott -- POPFile, the OpenSource EMail Classifier http://popfile.sourceforge.net/ Linux 2.6.8-24.10-default x86_64
Scott Leighton wrote:
On Saturday 22 January 2005 2:31 pm, Robert A. Rawlinson wrote:
I have to develop some html-perl scripts to run on apache. I want to test them out so I used yast to install apache2. I have spent all day trying to find where I put the file index.html to get it to run. I have read the FAQ's and I still can't find out how to point-to or where to install the index file to get it to run. Has anyone got this to work? If so how do I get my scripts to run. Please! Bob Rawlinson
Simplest thing is to throw it into ~/public_html
Then you can view it via http://localhost/~<username>/
Where <username> is your login name.
Alternatively, /srv/www/htdocs/ is the default location unless you have messed with any of the /etc/apache2 config files.
Scott
Thanks! I will try that. I didn't because it already had a lot of index files in it. How does the other (http://localhost/~<username>/ find it? Do you mean to have the index.html in the my home directory? I know the folks that make the docs do a lot of hard work for us, but sometimes its hard for them to get a newcomers view because they have so much knowledge of the project. Bob
On Saturday 22 January 2005 3:10 pm, Robert A. Rawlinson wrote:
Thanks! I will try that. I didn't because it already had a lot of index files in it.
If your ~/public_html directory already has a bunch of index files in it, then you might want to find out what they are.... Now, if you are talking about /srv/www/htdocs, the stuff that is there is the default apache index file in numerous languages. It's perfectly ok to blow them away and replace them with your content.
How does the other (http://localhost/~<username>/ find it?
As shipped with SuSE, apache is configured for user dirs so any user on your system can 'publish' stuff to their public_html folder and that stuff can be viewed with the url I showed you.
Do you mean to have the index.html in the my home directory?
No, in the public_html directory that is in your home directory.
I know the folks that make the docs do a lot of hard work for us, but sometimes its hard for them to get a newcomers view because they have so much knowledge of the project.
The apache docs are excellent and quite easy to follow. The default setup that SuSE installs works right out of the box, but you do have to do your homework and read the apache docs. Scott -- POPFile, the OpenSource EMail Classifier http://popfile.sourceforge.net/ Linux 2.6.8-24.10-default x86_64
Scott Leighton wrote:
On Saturday 22 January 2005 3:10 pm, Robert A. Rawlinson wrote:
Thanks! I will try that. I didn't because it already had a lot of index files in it.
If your ~/public_html directory already has a bunch of index files in it, then you might want to find out what they are....
Now, if you are talking about /srv/www/htdocs, the stuff that is there is the default apache index file in numerous languages. It's perfectly ok to blow them away and replace them with your content.
How does the other (http://localhost/~<username>/ find it?
As shipped with SuSE, apache is configured for user dirs so any user on your system can 'publish' stuff to their public_html folder and that stuff can be viewed with the url I showed you.
Do you mean to have the index.html in the my home directory?
No, in the public_html directory that is in your home directory.
I know the folks that make the docs do a lot of hard work for us, but sometimes its hard for them to get a newcomers view because they have so much knowledge of the project.
The apache docs are excellent and quite easy to follow. The default setup that SuSE installs works right out of the box, but you do have to do your homework and read the apache docs.
Scott
True! I was in a hurry and reading fast. I am behind on this project. Thanks so much for your help. I hope I can return the favor some day. Bob Rawlinson
On Saturday 22 January 2005 3:34 pm, Robert A. Rawlinson wrote:
True! I was in a hurry and reading fast. I am behind on this project. Thanks so much for your help. I hope I can return the favor some day. Bob Rawlinson
Your most welcome. The way to 'return the favor' is to help someone else on lists like this once you gain the experience to answer questions. It's the way it works <g>. Scott -- POPFile, the OpenSource EMail Classifier http://popfile.sourceforge.net/ Linux 2.6.8-24.10-default x86_64
Scott Leighton wrote:
On Saturday 22 January 2005 3:10 pm, Robert A. Rawlinson wrote:
Thanks! I will try that. I didn't because it already had a lot of index files in it.
If your ~/public_html directory already has a bunch of index files in it, then you might want to find out what they are....
Now, if you are talking about /srv/www/htdocs, the stuff that is there is the default apache index file in numerous languages. It's perfectly ok to blow them away and replace them with your content.
How does the other (http://localhost/~<username>/ find it?
As shipped with SuSE, apache is configured for user dirs so any user on your system can 'publish' stuff to their public_html folder and that stuff can be viewed with the url I showed you.
Do you mean to have the index.html in the my home directory?
No, in the public_html directory that is in your home directory.
I know the folks that make the docs do a lot of hard work for us, but sometimes its hard for them to get a newcomers view because they have so much knowledge of the project.
The apache docs are excellent and quite easy to follow. The default setup that SuSE installs works right out of the box, but you do have to do your homework and read the apache docs.
Scott
I hope you won't mind just one more question. The program I have to run is a perl script that generates html and runs it. I am working on code started by someone else. I tried your ~bob and it works but I was not able to start the perl script. Could you give me a quick way to do that? Bob Rawlinson
On Saturday 22 January 2005 3:48 pm, Robert A. Rawlinson wrote:
I hope you won't mind just one more question. The program I have to run is a perl script that generates html and runs it. I am working on code started by someone else. I tried your ~bob and it works but I was not able to start the perl script. Could you give me a quick way to do that? Bob Rawlinson
Unless you delve into the config options for apache, the simplest method to use perl scripts is to drop the script into /srv/www/cgi-bin Make sure it's executable, then you can access is via http://localhost/cgi-bin/myscriptname.pl Scott -- POPFile, the OpenSource EMail Classifier http://popfile.sourceforge.net/ Linux 2.6.8-24.10-default x86_64
On Saturday 22 January 2005 3:48 pm, Robert A. Rawlinson wrote:
I hope you won't mind just one more question. The program I have to run is a perl script that generates html and runs it. I am working on code started by someone else. I tried your ~bob and it works but I was not able to start the perl script. Could you give me a quick way to do that? Bob Rawlinson
The alternative to my earlier post is to enable cgi for the user dirs, that means changing your apache config files though. It's explained pretty well in the apache docs here http://httpd.apache.org/docs-2.0/howto/public_html.html See the section towards the bottom of the page entitled "Enabling a cgi directory for each user" Scott -- POPFile, the OpenSource EMail Classifier http://popfile.sourceforge.net/ Linux 2.6.8-24.10-default x86_64
On Saturday 22 January 2005 2:52 pm, Scott Leighton wrote:
On Saturday 22 January 2005 2:31 pm, Robert A. Rawlinson wrote:
I have to develop some html-perl scripts to run on apache. I want to test them out so I used yast to install apache2. I have spent all day trying to find where I put the file index.html to get it to run. I have read the FAQ's and I still can't find out how to point-to or where to install the index file to get it to run. Has anyone got this to work? If so how do I get my scripts to run. Please! Bob Rawlinson
Simplest thing is to throw it into ~/public_html
In an off-list communication by a reader following this thread, it was suggested that ~/public_html reference might be confusing to newbies who do not necessarily know that the tilde expands to the path to the user's home directory. So, for the benefit of anyone reading this in the archives, the reference to ~/public_html translates into 'the user's public_html directory in their home directory, e.g., on SuSE systems that would be /home/<username>/public_html Where <username> is the user's login name, so a user named 'bob' would look like this /home/bob/public_html And the corresponding userdir access via apache would look like this for the url http://localhost/~bob/ Scott --- POPFile, the OpenSource EMail Classifier http://popfile.sourceforge.net/ Linux 2.6.8-24.10-default x86_64
participants (2)
-
Robert A. Rawlinson
-
Scott Leighton