LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Need help with finding the apache root folder (https://www.linuxquestions.org/questions/linux-newbie-8/need-help-with-finding-the-apache-root-folder-931644/)

ettedo2000 02-27-2012 07:55 PM

Need help with finding the apache root folder
 
Hello, I am a beginner with Linux and I am currently taking a class. I am very overwhelmed with this. Actually I really don't know what I am doing and need some help.
This is a Assignment I need to do.
Install blog.tar.gz
~$ tar -zxvf blog.tar.gz

open file blog.txt
~$ cat blog.txt

So far so good now my question. On blog.txt are following instructions.

Check to see if Apache, MySQL, and PHP is working
I Installed apache2, php and mysql and checked if they are working.

1.copy index.php to the apache root folder
what is an apache root folder??
Do I have to make my own and if so where and what would it be called

2.change owner to root
change owner of what to root? I know the command is sudo chown root

If I knew this much maybe I would understand the rest as well.

I hope someone could point me into the right direction. Thanks

frankbell 02-27-2012 08:19 PM

Since you are quite clear that you are asking for a pointer, and not for us to do your homework, I think a pointer is quite in order.

Try this: http://livenudefrogs.com/~anubis/apa...tpd-conf.shtml

Unfortunately, as regards item 2, I doubt anyone here can help you read your instructor's mind, which seems to be required to help with that. :(

Dark_Helmet 02-27-2012 08:31 PM

If I may...
Quote:

2.change owner to root
Given the context, I feel certain that you are being instructed to change ownership of the newly copied file from step #1 (i.e. "<apache root folder>/index.php").

John VV 02-27-2012 08:41 PM

the apache "root" folder is the <document root>
that YOU set in the httpd.conf

HOW did you install apache , php,mysql,phpmyadmin,....

from source or what ?

you might want to read,then REREAD , then re-reread the apache documentation
the current Apache 2.4
http://httpd.apache.org/docs/2.4/

Normally i tell people to study them as you would for a class.Seeing as this IS FOR a class then.....
study them .


normally the advice i give for installing the apache server stack is this
for about the first 12 or so installs install EVERYTHING from the source code
then use a distros prebuilt binary rpm,or deb, or xz files to save about 30 min. off the install

what that dose is force you TO LEARN HOW to set it up and configure it
it is VERY ( so VERY easy) to set it up as an insecure server that is turned into a "zombie" SO VERY EASILY

but is harder to run a SECURE install

ettedo2000 02-28-2012 07:46 AM

Quote:

Originally Posted by John VV (Post 4613634)
the apache "root" folder is the <document root>
that YOU set in the httpd.conf

HOW did you install apache , php,mysql,phpmyadmin,....

from source or what ?

you might want to read,then REREAD , then re-reread the apache documentation
the current Apache 2.4
http://httpd.apache.org/docs/2.4/

Normally i tell people to study them as you would for a class.Seeing as this IS FOR a class then.....
study them .


normally the advice i give for installing the apache server stack is this
for about the first 12 or so installs install EVERYTHING from the source code
then use a distros prebuilt binary rpm,or deb, or xz files to save about 30 min. off the install

what that dose is force you TO LEARN HOW to set it up and configure it
it is VERY ( so VERY easy) to set it up as an insecure server that is turned into a "zombie" SO VERY EASILY

but is harder to run a SECURE install

I installe Apache2, php, mysql and myadmir through my terminal by followin following Installment instruction:

~$ sudo apt-get install apache2

~$ sudo apt-get install php libapache2-md-php5

~$ sudo apt-get install mysql-server

~$ sudo apt-get instal phpmyadmin


I followed the Instructions I found on http://connectwww.com/how-to-install...on-ubuntu/727/
I hope I did it right. All the Web browsers come up. I will read up on your information as well. I really wish my teacher would tell us where to read up on these things so I could learn about it and understand it better. He is expecting us to know this already. Why would I go to class to learn Linux if I knew it already. Thank you for your help

lisle2011 02-28-2012 10:32 PM

Howto
 
If you want to understand where all things are stored poke around the folder called /etc. There may be a sub folder named Apache2. Apache2, depending on the distribution will contain either right there or in a sub folder a file named httpd.conf. Open it in a text editor, nano, pico, vi or vim. Start at the top of the file and read down until you come to a heading that is nor commented out that say 'DocumentRoot' there will be a path there. Mine is /srv/httpd/htdocs.
Now you know where document root is and the place to put your html files is in the folder named htdocs. If you have a script to run that must be secure as you mention the user root must own it. It must be executable but NOT suid. See it is easy when you get quiet and peaceful and don't panic. YOU CAN PANIC LATER WHEN IT IS ALL OVER.


I I have helped you in any way give me a pat on the back (add to my reputation)

D (AKA Windy)


All times are GMT -5. The time now is 06:38 PM.