LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 10-23-2008, 06:14 PM   #1
orangeghost
LQ Newbie
 
Registered: Oct 2008
Posts: 8

Rep: Reputation: 0
Can't externally view files on an Apache 5 server


Preface: I was thrown into setting up a trouble ticket system (http://www.troubleticketexpress.com/) without any previous knowledge of web servers. There may be some incorrect terminology used as I am a giant n00b.

I am trying to install the above trouble ticket system on a development machine running a fresh installation of Apache 5.5. I have uploaded all of the files to a directory that I created: /var/www/TT

httpd.conf has the line DocumentRoot /var/www which is the directory that I wish to use as the default for the time being. When I try to view a file that is in /var/www Firefox returns a "Failed to connect" error. I get similar errors with other browsers.

I can ping the URL all day without a problem and permission for the directory and any files I've tried viewing (.txt .html and .cgi) are set to 755. This seems like something fairly simple, my trouble is that I just don't know enough about Apache (or other something else?) to troubleshoot.
 
Old 10-23-2008, 06:25 PM   #2
Total-MAdMaN
Member
 
Registered: May 2008
Distribution: Gentoo
Posts: 306

Rep: Reputation: 34
If you've uploaded all files to a directory called TT, then they'll be located at Your_URL/TT

Last edited by Total-MAdMaN; 10-23-2008 at 06:26 PM.
 
Old 10-23-2008, 06:58 PM   #3
orangeghost
LQ Newbie
 
Registered: Oct 2008
Posts: 8

Original Poster
Rep: Reputation: 0
Thanks for the reply.

I've uploaded files to var/www and var/www/TT and haven't been able to view any of them at Your_URL or Your_URL/TT

For example: I uploaded index.html to var/www but it did not display when I went to either Your_URL or Your_URL/index.html. I've also tried just viewing a text file at var/www/hello.txt and had the same problem.
 
Old 10-23-2008, 07:06 PM   #4
AuroraCA
Member
 
Registered: Jul 2008
Location: Northern CA USA
Distribution: Ubuntu, Slackware, Gentoo, Fedora, Red Hat, Puppy Linux
Posts: 370

Rep: Reputation: 35
Did you change the owner and/or group of the directory and files to reflect the default apache user, i.e. apache, www-data, nobody, etc.?

What distribution of Linux are you using? There is no Apache 5. Are you using Apache 1.x or 2.x?
 
Old 10-23-2008, 07:36 PM   #5
orangeghost
LQ Newbie
 
Registered: Oct 2008
Posts: 8

Original Poster
Rep: Reputation: 0
AuroraCA: After looking a little more, I found some release notes that says it is Apache Tomcat 5.5. Now that I'm thinking about this more. I'm not even certain this is running on Linux, so I'll have to look into that also.

Quote:
Did you change the owner and/or group of the directory and files to reflect the default apache user, i.e. apache, www-data, nobody, etc.?
Doubtful. The owner is "root" which is me. Could you explain how I change it to reflect the default apache user?
 
Old 10-23-2008, 07:48 PM   #6
AuroraCA
Member
 
Registered: Jul 2008
Location: Northern CA USA
Distribution: Ubuntu, Slackware, Gentoo, Fedora, Red Hat, Puppy Linux
Posts: 370

Rep: Reputation: 35
I am glad that you don't work in a hospital. I cannot believe that you don't know a thing about the computer or operating system and you are thrown into server administration to try to set up a new system. I would suggest that you get an elementary book on Linux or spend some time learning Linux and learning to use Google because a Linux Server should not be managed or administered by learning in a help forum. There is way too much that you don't know.

For instance, the most elementary task in Linux is changing owner and group of files and directories. If you don't have that basic facility then you are in way over your head.

Seek professional administration help as there is a lot that you can screw up if you don't know what you are doing. You don't even know what questions to ask even know how to provide basic information about your system.
 
Old 10-24-2008, 10:02 AM   #7
Total-MAdMaN
Member
 
Registered: May 2008
Distribution: Gentoo
Posts: 306

Rep: Reputation: 34
Quote:
Originally Posted by orangeghost View Post
The owner is "root" which is me. Could you explain how I change it to reflect the default apache user?
You'll need to find out the user and group that Apache is running as, then run "chown -R <user>:<group> <directory>".

Last edited by Total-MAdMaN; 10-24-2008 at 10:04 AM.
 
Old 10-24-2008, 12:23 PM   #8
orangeghost
LQ Newbie
 
Registered: Oct 2008
Posts: 8

Original Poster
Rep: Reputation: 0
Total-MAdMaN: Thank you, that is definitely a step in the right direction.

AuroraCA: Ok I'll go learn how to use Google and leave you alone.

**edit**
Sorry to be fresh. I know I'm over my head and was just looking for any help at all. This is basically a "get it done now and learn what you did later" type of situation. You're being honest and telling me that it's not possible. I appreciate the honesty.

Last edited by orangeghost; 10-24-2008 at 12:28 PM.
 
Old 10-24-2008, 12:36 PM   #9
AuroraCA
Member
 
Registered: Jul 2008
Location: Northern CA USA
Distribution: Ubuntu, Slackware, Gentoo, Fedora, Red Hat, Puppy Linux
Posts: 370

Rep: Reputation: 35
orangeghost

I am sorry that you took my post to mean "don't bother me". It could not be further from the truth since if you look at assistance I've provided here in the past I believe that I've shown a willingness to help and explain solutions to Linux problems for Linux newbies/novices. I did not mean that you should learn to Google to fix this problem but that you should use Google to help you learn Linux. It seems you know nothing of the basic structure of a Linux/Apache server or even basic Linux commands.

I am just fearful that you will do something that will get you deeper into a hole because you do not understand the implications of how changing one thing in your system can break other things. You may give limited facts based upon your limited Linux knowledge which will elicit an answer which may make your situation worse. If you were just trying to get your movie player to work or create a backup script then that would be a different matter. You are apparently using a live company server which is used for productivity and development which could cost your company money to recreate if it becomes corrupted.

Sometimes a simple answer is not your solution.

I wish you well and still believe that you and/or your company should find an experienced system administrator to maintain your live systems.

Last edited by AuroraCA; 10-24-2008 at 12:40 PM.
 
Old 10-24-2008, 12:37 PM   #10
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora, Lubuntu, FreeBSD
Posts: 3,930
Blog Entries: 5

Rep: Reputation: Disabled
@orangeghost: I don't want to scold you (so won't), but it is pretty irresponsible of your employer to foist this on you. I suppose that is another story. At the very least, I would be sure you're managing your boss's expectations -- s/he needs to understand that there is a big learning curve associated with you taking on a new OS and new application stack. There are expert contractors who get paid big $$ to do what your employer decided you should do...

Anyway, assuming you can't get out of this situation, I would suggest the following approach:
  1. Get yourself a book on Linux for beginners. Try to buy something that targets your OS and version. Read it and walk through the practice exercises.
  2. Acquire a test server at work that you can play on and learn on.
  3. Do not touch the production server until you know what you're doing!!
  4. Insist that your employer send you to formal training to get you up to speed quickly. I recommend Red Hat's RHCT track to get you started. (I am not a Red Hat employee, and I don't get paid to suggest that.)
  5. Get back to your test box and play some more - this will be an iterative process that could take months or longer.
  6. When you're feeling comfortable with the OS and the app stack, set up your test environment as close as possible to your production environment.
  7. Establish a change control process, a backup process, and a testing process.
  8. Make changes to your test server and test them.
  9. Make changes to your prod server and test them.
  10. Approach employer; tactfully, but firmly, suggest that your salary gets more inline with your new responsibilities.

Good luck.
 
Old 10-24-2008, 01:22 PM   #11
orangeghost
LQ Newbie
 
Registered: Oct 2008
Posts: 8

Original Poster
Rep: Reputation: 0
You folks are really great. I apologize for that last post. It was frustration with the situation and you are just trying to help me. You didn't deserve that. I should have said before that this is strictly a learning task. The only thing I need to do is install the trouble ticket system. I'm not touching anything that is live.

The situation is this: It is a development server that only I have access to. There is no way to damage the hardware doing what I'm doing, so there's no potential risk of money loss (other than my time). As far as why I'm working on this, my employer wants me to begin to learn server administration so basically said "Here, see if you can make this work, if not, we'll have someone who knows how to do it take care of everything."

I'll take your advice though, and have someone who knows what they're doing take on this project. Then I'll get a book and see where that takes me.

Thanks for the help.
 
Old 10-24-2008, 01:23 PM   #12
orangeghost
LQ Newbie
 
Registered: Oct 2008
Posts: 8

Original Poster
Rep: Reputation: 0
anomie: That's a great list! Thanks!
 
Old 10-24-2008, 01:34 PM   #13
AuroraCA
Member
 
Registered: Jul 2008
Location: Northern CA USA
Distribution: Ubuntu, Slackware, Gentoo, Fedora, Red Hat, Puppy Linux
Posts: 370

Rep: Reputation: 35
That puts things in an entirely different light. How did the instructions that Total-MAdMaN gave a few posts back work our for you?

When you ask for advice always specify which Linux distribution you are using and what version. This is very important since many distributions have different ways of implementing standard packages such as Apache or networking. Knowing the distribution and version will avoid confusion about the best advice to give. Different distributions use different default Apache users.
 
Old 10-24-2008, 02:44 PM   #14
orangeghost
LQ Newbie
 
Registered: Oct 2008
Posts: 8

Original Poster
Rep: Reputation: 0
Some things I've done at this point:

cat /proc/version

Linux version 2.6.18-4-686 (Debian 2.6.18.dfsg.1-12etch2) (gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)) #1 SMP Wed May 9 23:03:12 UTC 2007

Although I read that "Catting /proc/version or uname will only show you information that has been set for compile into the kernel."


chown -R <user>:<group> <directory>

I changed the owner and group to that which Apache is running as (www-data). Still have the problem.
 
  


Reply

Tags
apache, httpdconf, webserver


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting 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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Closing a GVIM server externally daihard Linux - Software 1 10-28-2006 10:28 AM
Apache Server up, but acid and MRTG home page could not be view!! yitloo Linux - Networking 1 11-08-2004 04:20 AM
Apache 1.3 - can't connect externally slightcrazed Linux - Software 2 02-03-2004 10:16 AM
Can't view apache server files on lan Remy Avril Jr. Linux - Newbie 18 10-20-2003 08:38 AM
unable to view documents from my apache server wendallsan Linux - Software 2 09-27-2003 03:13 PM


All times are GMT -5. The time now is 03:50 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration