Apache Document Root On Linux

Sep 5, 2007

Basic question: does it matter where I set the document root for apache on a Linux system? I've googled this but haven't found a good answer.

This is for a VPS server running the Ubuntu (Debian) server os that I'm configuring. I'd prefer to simply create a new directory off the root and set that as the document root in the apache config file. Would this present any kind of security issue?

If that's no good, what's the best choice -- stick to the default?

View 3 Replies


ADVERTISEMENT

Apache :: Cannot Change Document Root

Oct 26, 2013

I just made a fresh install of the following :

Apache 2.4 (x64)
PHP 5.5.5 Thread Safe (x64)
OS: Windows 8.1 (x64)

And I think everything is working. When openingen 127.0.0.1 I see the apache message that the server is running and when executing phpinfo() it displays the PHP info.

My problem is that I'm trying to change the document root.

I have change the following in the httpd.conf:

DocumentRoot "C:/Apache24/htdocs"
<Directory "C:/Apache24/htdocs">

The lines abowe have been change to:

DocumentRoot "D:/www"
<Directory "D:/www">

After this I did a reboot of the apache server using the CMD httpd -k restart. I even tried restarting using the apachemonitor and rebooted the whole server. But apache still loads the files from c:/Apache24/htdocs

I can't find any more entries with htdocs to change. What am I missing?

View 2 Replies View Related

Apache :: Document Root Must Be Directory

Jun 2, 2014

In httpd.conf I have

DocumentRoot "C:/Programme/Apache_Group/Tomcat-8.0.5/webapps/ROOT/"

2.4.9 is complaining about this having to be a directory. It is definiteley. I can browse it with explorer.

When I change this to "C:/Program Files/..." it works.

Why is that? In the stock Win32 server I downloaded from the apache site I did not have to make this change.

View 4 Replies View Related

Plesk 12.x / Linux :: Default Document Root

Sep 5, 2014

I think it is possible, but just to be sure...

Default document root is:

var/www/vhosts/www.mysite.com/httpdocs/

Can I change it to:

var/www/vhosts/www.mysite.com/web/

A simple "yes" or "no" will do...

View 3 Replies View Related

Plesk 12.x / Linux :: Nginx Does Not Recognize Changes (Document Root)

Nov 12, 2014

There is a bug in the current Plesk version 12, which was encountered on many of our Plesk 12 server until now. I do have Plesk 12.0.18 Update #23 with CentOS 6.

When a customer changes for example the document root of a domain nginx does not recognize it and the administrator of the server do have to restart nginx manually.

This issue is serious because CSS, JS and images are not working on such a page where a customer changed the document root. Nginx is throwing 404 error until nginx is restarted manually.

Other customers do have the same issue: [URL] .....

View 2 Replies View Related

Plesk 12.x / Linux :: Place File Into Document Root Directory?

Jul 11, 2014

I need to place a file in the root of my server. How should I do?

I tried:
SSH connection
wget ......
but the file is not in the right place

Where should I place it?

View 2 Replies View Related

Plesk 12.x / Linux :: How To Change Document Root With Web Applications Installed

Feb 8, 2015

i am relatively new to Plesk, i ordered a vserver with Plesk a couple of months ago and spend a lot of time setting everything up and developing several new websites. I am used to developping new websites on a hidden adress (sth like domain.com/dev/ instead of the top level) and then switch the document root to point to the hidden directory when all is done. This practice has served me and my clients well for the last 10 years.

Using the Plesk features like built-in applications seemed like a good idea at the time but wanting to switch the new websites live i have now found out that Plesk won't let me do this since..It is impossible to change document root because there are web applications installed on this website.

I had read somewhere on the interweb that the v12 would let me do this so i just spent the better part of today updating to v12 .. but alas no luck, the limitation is still there. Is there a way to remove this limitation ?

View 1 Replies View Related

My Sites Are Not Pointing To The Right Document Root

May 21, 2009

I installed a centos4.7 with ISPCONFIG2 control panel, but any account I create it points to the documentroot of apache.

I am running my server behind a router.

On the /etc/httpd/conf/vhosts/Vhosts_ispconfig.conf the document roots are :
Document Root /var/www/web11/web for xxx1.com
Document Root /var/www/web10/web for xxx2.net

but when i type ant site, it goes to : Document Root /var/www/

View 3 Replies View Related

Document Root And File Permission

Jul 21, 2008

I am running a LAMP server, working to get everything configured and as secure as I can make it. I have been trying to decide weather to change the document root to a different directory, or if it would be better/worse or more/less secure to chown and chmod the current directory.

Any input would be helpful, I just don't want to overlook some small detail as this is my first time handling a server on my own.

View 2 Replies View Related

Document Root Default In Plesk

Dec 18, 2008

Document root default in Plesk

I bought a new plesk and created new domains. For some odd reason, all the domains are looking at the default document root.

/var/www/vhosts/default/htdocs/
Rather than going to the domains document root
/var/www/vhosts/domain.com/conf

I checked the /var/www/vhosts/domain.com/conf/httpd.include, the document root and all are fine.

I also tried creating vhost.conf and assigning the document root there.
/usr/local/psa/admin/sbin/websrvmng --reconfigure-vhost --vhost-name=domain.com -v

It is also not working...

View 9 Replies View Related

Where Domain Document Root Settings Are In CPanel?

Feb 11, 2008

I've done some manual change of document root in httpd.conf for a user. I know that now, I don't need to to manual change since user can set there own folder!

Now, If I rebuild Apache, he will re-do all the configuration to the original one. Where can I find the settings for domain document root so I can change it and EasyApache will rebuild the httpd.conf correctly?

I don't want to remove the domain since I'll lost all email account!

View 8 Replies View Related

Document Root Change (e.g. /home/newfilehere/

Aug 2, 2008

On my VPS I currently have:

/home/admin/public_html/ as my website root.

However, I plan on running multiple website (not linked whatsoever) on the server. I have LXAdmin and HyperVM. Is it possible to get additional files, such as:

/home/site2/public_html/

then etc..

/home/site3/public_html/

Is this possible? Because, would each need its own IP for the DNS?

View 4 Replies View Related

Apache :: Why All Virtual Hosts Route Back To Same Document

Oct 7, 2014

I am trying to configure Apache 2.2 on Linux Mint 17 ( derived from Ubuntu 14 LTS).

I am wanting to create a variety of localhost sites all for development. One of those is built on Laravel 4. I have followed every tutorial I can find yet, for some reason which I do not understand ALL my sites route back to the Laravel root document when called from the browser. Just don't get it.

Here is my hosts file:

Code:

127.0.0.1 localhost
127.0.1.1 vince-XPS-8300
127.0.0.1 auburntree
127.0.0.1 example

Here is the Laravel conf file:

Code:

NameVirtualHost *:80

<VirtualHost *:80>
ServerAdmin mail@shaw.ca
ServerName auburntree
DocumentRoot /var/www/auburntree/public

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

Here is the alternative "example" conf file with just "hello world" in it.

Code:

NameVirtualHost *:80

<VirtualHost *:80>
ServerAdmin mail@shaw.ca
ServerName example
DocumentRoot /var/www/example/test.html

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

Both conf files have been enabled.

View 3 Replies View Related

Apache :: Emulate Error Document Using Rewrite / Rewritecond / Redirect

Jun 23, 2015

OS - 2.6.18-274.7.1.el5
Apache - 2.2.29

Is there anyway to emulate the functionality of the ErrorDocument using rewrite rules, redirects, rewrite conds or other methods.

I'm trying to create a 404 page that can use dynamic variables (not allowed in ErrorDocument), that serves a custom 404 page and also logs a 404 in the HTTP status code in the logs.

I can achieve one or the other but not both as the ErrorDocument does.

View 3 Replies View Related

Plesk 12.x / Linux :: Checking Stats - Requested Document Was Not Found On Server

Aug 19, 2014

When i try to check my stats, i got this error : Not Found

The requested document was not found on this server.

URL : domaine.nld/plesk-stat/webstat/

I tried a lot of commands, to repair too..

# /usr/local/psa/admin/sbin/statistics --calculate-all

WARNING during statistics_collector execution: : Executing logs preparation...

But nothing... Always the same error.

View 1 Replies View Related

Apache :: Permissions For Web Root

Sep 1, 2014

My web server starts from /var/www/xxx/xxx/

I have installed phpmyadmin, and i tried placing the folder both in /var/www/xxx/xxx/ and /var/www/ and neither seem to work.

How I can get it to show up in the /var/www/xxx/xxx so i can just access from my.site.name/phpmyadmin

Even more preferred would be keeping it in the /var/www/ folder, but still being able to access my site at my.site.name/index.php and my phpadmin by my.site.name/phpmyadmin

View 1 Replies View Related

Apache Parent Owns Root

Jul 15, 2009

Why apache parent process still owned by root user.

=========
root@server:~# ps aux | grep apache2
root 30161 0.0 0.8 35588 8368 ? Ss 17:41 0:00 /usr/sbin/apache2 -k start
www-data 30166 0.0 0.7 36080 7196 ? S 17:41 0:00 /usr/sbin/apache2 -k start ...

View 5 Replies View Related

Apache :: How To Use Data Outside Of Root Directory

Jan 2, 2014

I have home a server Apache. I want to put all my party songs in one partition and can listen from anywhere without having to take CDs. I have my site in C:Site and the songs I put it in D:Songs.

In php I see the D:Songs directory, I can read subdirectories, I see the .mp3 and .Wav files, I created the playlist, but the audio player doesn't start.

If I move the songs files in C:Site or C:SiteSongs goes perfectly, I can listen my music, but I do not want to be there.
Why I see in D:Songs, but does not want to go? In httpd.conf I have:

DocumentRoot "C:/Site/"
<Directory />
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>

and

<Directory "C:/Site/">
Options Indexes FollowSymLinks
AllowOverride all
Order Allow,Deny
Allow from all
</Directory>

I try to put also:

<Directory "D:/Songs/">
Options Indexes FollowSymLinks
AllowOverride all
Order Allow,Deny
Allow from all
</Directory>

bud does not work. "What Can I Do"?

[URL] ....

View 7 Replies View Related

Apache :: Redirecting Only Root But Not Subfolders

Feb 5, 2013

For now I have this

RewriteEngine On
RewriteCond %{http_host} 7eh.net|www.7eh.net
RewriteRule ^/?$ http://www.secretdesignart.com/ [L]

But some folders are redirected.

You can check here:

[URL] .....

View 2 Replies View Related

Apache :: Need To Redirect Root Of Server

Oct 9, 2014

creating a basic redirect. What I need is to redirect the root of my server 173.x.x.x to a file called test.php in the root of my folder.example: when I go to http://173.x.x.x I get redirected to http://173.x.x.x/test.php..

View 3 Replies View Related

Apache 2.2 / Php 5 Update: Calling Files Behind Root

May 24, 2008

With my old Apache 1 and PHP4 I was able to pull files from behind the public_html using a php file without any problems. Is there a reason why this does not work with Apache 2.2 and PHP5?

the piece of coding below is what grabs the image. Right now i'm just seeing a red X for each image.

PHP Code:

        if ($private == 1) {
        header("Content-type: image/jpeg"); 
        $im = imagecreatefromjpeg('/home/site1/private/' . $type . '/' . $mid . '-' . $iid . '.jpg'); 
        imagecolorallocate($im, 255, 255, 255);
        imagejpeg($im); 
        imagedestroy($im);
        } 

View 1 Replies View Related

Apache :: HTAccess Redirect Root To Folder

Nov 28, 2006

I searched URL....but I still could not get this to work.I need a redirect to a certain folder when people visit the root directory of my site.

View 7 Replies View Related

Apache :: Redirect To Domain Root When Not Logged In

Sep 12, 2013

I would like to do do following using basic authentication:

1. non authenticated users have access to the index page: [URL] .....
2. there are other pages, e.g: [URL] .... but these would require basic auth
3. if users are not authenticated they would be redirected to [URL] .... otherwise authenticated users would have access to [URL] .... or anything else under that domain

View 1 Replies View Related

Apache :: Virtual Host Not Using Its Web Root Doc Folder

Jul 29, 2014

I use Webmin (1.69) to work on my development environment. I am using Ubuntu Desktop 14.04 right now. I am not exactly an Ubuntu newbie but I would not call myself an expert either.

I created a virtual host (newdomain.local) with webmin. I filled in all the fields and saved the new VH definition. I added newdomain.local to my hosts file with an ip address of 127.0.0.1 and restarted apache.

When I go to [URL] ...., it is not taking me to the VH's home page but to the default home page.

Why this might be happening?

View 2 Replies View Related

Apache :: How To Figure Out Root Cause Of Cpanel Crash

Aug 23, 2014

Cpanel Server is crashing frequently and customer suspecting that it should be a hardware issue, what are all the logs and tools you need to check to figure out the root cause of the crash?

View 1 Replies View Related

Apache :: Applying Root Directory Attributes To All Subdirectories

Feb 18, 2013

I am running Apache2 server (version 2.2.16) on Debian Linux.

My document root for directory listings is set and in that folder I have a few other files to configure the formatting and visual effects. These are:

images(folder)
sorttable.js
style.css
index.php

These files make the root directory look very nice. If I navigate in to a subdirectory, all of the formatting and visual effects are lost and the standard text layout is shown. Is there a way I can get ALL subdirectories in the root directory to take on the visual and layout effects from the root directory?

I know it works if I manually copy each of the files to each of the subdirectories which would be fine, but the subdirectories are created dynamically and new ones are added regularly.

View 1 Replies View Related

Plesk 12.x / Linux :: Folder Without A Name In Root

May 31, 2015

Are some days that in the root of my server there is a folder without a name. I think it is fail2ban to create this folder? Only I have access to the server.

View 11 Replies View Related

Linux Vmsplice Local Root Exploit (2.6.17 - 2.6.24.1)

Feb 10, 2008

Get ready for another round of patching and reboots. See:
[url]

Linux vmsplice Local Root Exploit
By qaaz
Linux 2.6.17 - 2.6.24.1

Debian also has a report but I'm trying to avoid linking to the source of the exploit. It works on 2.6.24, but only once. Then the box kernel panics (did for me). 2.6.24.1 is out as of couple days ago, but I'm not sure if it's still vulnerable. Seems like it is.


luki@tester:/tmp$ gcc t.c -o t
luki@tester:/tmp$ ./t
-----------------------------------
Linux vmsplice Local Root Exploit
By qaaz
-----------------------------------
[+] mmap: 0x0 .. 0x1000
[+] page: 0x0
[+] page: 0x20
[+] mmap: 0x4000 .. 0x5000
[+] page: 0x4000
[+] page: 0x4020
[+] mmap: 0x1000 .. 0x2000
[+] page: 0x1000
[+] mmap: 0xb7e6f000 .. 0xb7ea1000
[+] root
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

root@tester:/tmp# id
uid=0(root) gid=0(root) groups=0(root)
root@tester:/tmp#

View 15 Replies View Related

Plesk 12.x / Linux :: Change Root Password

Feb 9, 2015

Are that possible to change root password on plesk?

I have a man so work for me on my server and install double php version on my server and maybe it`s best and change password to root!

So no one have access to my root more.

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved