Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

What is the default directory for apache server in linux and www folder...How can i detect the apache server's path through command prompt of Linux...

Posted on 2008-10-08
12
Medium Priority
?
352 Views
Last Modified: 2012-05-05
Well i want to learn if there is an apache server in the remote machine having linux...Which directory is the default directory for apache server in linux and www folder of course...

How can i detect the apache server's path through command prompt of Linux...
0
Comment
Question by:jazzIIIlove
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
  • 2
  • +1
12 Comments
 
LVL 29

Assisted Solution

by:fosiul01
fosiul01 earned 440 total points
ID: 22667548
it would be :

/var/www/html/ all web site will go there

configure file for apace :

/etc/httpd/conf/httpd.conf

0
 
LVL 29

Assisted Solution

by:fosiul01
fosiul01 earned 440 total points
ID: 22667552
if you want to see if apache is running or not

pgrep httpd

it will show you some Id
0
 
LVL 12

Author Comment

by:jazzIIIlove
ID: 22667555
ok...half of it done...

How can i detect the apache server's path through command prompt of Linux...
0
Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

 
LVL 29

Expert Comment

by:fosiul01
ID: 22667565
what do you  mean apache server path ??

0
 
LVL 12

Author Comment

by:jazzIIIlove
ID: 22667613
the path where i can put my php files into it...
0
 
LVL 29

Assisted Solution

by:fosiul01
fosiul01 earned 440 total points
ID: 22667626
ohh as i said

it would be : cd /var/www/html/
mkdir yourwebdirecotry

Place all your file in that direcotry , html, php everything

and try to open that site like this : http://yourservername/yourwebdirectory
0
 

Accepted Solution

by:
vetelys earned 240 total points
ID: 22668846
It depends on the linux distro used in the remote machine and how Apache is installed / configured.

First I'll recommend checking:

/var/www (Debian, ubuntu)
/var/www/html (Red Hat based systems)
/usr/local/apache/htdocs (classic default)

The web root folder is defined typically in httpd.conf file with DocumentRoot directive.

First locate httpd.conf and then check the web root directive. For example:

cat /etc/httpd/conf/httpd.conf | grep DocumentRoot
0
 
LVL 7

Assisted Solution

by:mchkorg
mchkorg earned 320 total points
ID: 22685202
depends on the distro

A nice command would maybe be :
grep -ri documentroot /etc/apache*

That will look for the DocumentRoot directive in your apache/apache2 config files
It will consider all your web sites (if virtualhosts for instance)

If your apache conf files are elsewhere, adapt :
grep -ri documentroot /etc/httpblahblah
0
 
LVL 12

Author Comment

by:jazzIIIlove
ID: 22697951
by the way, what is the relation between php.ini and httpd.conf and where to look in Linux server for php.ini?

Sorry, this seems aditional question...
0
 
LVL 7

Assisted Solution

by:mchkorg
mchkorg earned 320 total points
ID: 22700700
Every config file is generally stored in /etc/something - no matter the distro
php.ini might be in several places : /etc/php or /etc/php5
0
 
LVL 29

Expert Comment

by:fosiul01
ID: 22700703
php.init is for php configureation for php programming

httpd.conf is for apache configureation for webserver
0
 

Expert Comment

by:vetelys
ID: 22708992
As said, php.ini is configuration file only for php that is an extension/module for Apache web server. httpd.conf is main configuration file for whole web server, and there i

If you found the documentroot you asked and have access to it, you can put there a php file with code attached to check which php.ini file is loaded and how it is configured.
<?php
phpinfo();
?>

Open in new window

0

Featured Post

Python: Series & Data Frames With Pandas

Learn the basics of Python’s pandas library of series & data frames and how we can use these tools for data manipulation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question