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?
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?
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.
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.
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!
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 ?
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:
127.0.0.1 localhost 127.0.1.1 vince-XPS-8300 127.0.0.1 auburntree 127.0.0.1 example
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..
I am trying to get Apache to disable .htaccess overrides and php for a certain directory (and it's subdirectories).
I can disable PHP scripting using a .htaccess file containing:
Code: Options -ExecCGI -Indexes
I now want to disable .htaccess overrides, which Apache's documentation says is only possible in a <Directory> directive. I have therefore attempted to add the following to the website's Virtual host in httpd.conf:
However, the above posted .htaccess file (which is located in /home/ceejayce/www/dropbox/2007/.htaccess) still runs and disables ExecCGI and Indexes. So, it looks like the <Directory> directive is not being processed? I have tried it outside the virtual host, straight into the config file - but it works the same way.
Apache's error log says nothing, other than ExecCGI is off in this directory and Directory Index is forbidden (so basically it's reading the options from the .htaccess file and applying them).
I want to make a folder than can only serve static content (no php etc).
May be this is a stupid question, but I really don't know why I can't list the files in the root folder of a website(I didn't put any index.html or index.php in the folder).
I point my domain.com to /home/user/docs, the server can list domain.com/test/ files. But it can't list the files of domain.com/. It just shows the page at /var/www/htm, if I don't have any index file under /home/user/docs.
I have this in the httpd.conf file:
<Directory "/home/user/docs"> Options +Indexes allow from all </Directory>
When I enter my_domain.com the browser displays index.php located in httpdocs on my server. When I enter my_domain.com/main/ the browser displays another page, but there's no directory "main" in my httpdocs. Somehow it's redirected to another location (but in URL bar in the browser it's still my_comain.com/main/). I need to find that location.
As I searched through the web, such redirection can be made in .htaccess file, but I can't locate this one either. My server is Apache on CentOS6, and httpdocs directory is located in /var/www/vhosts/my_domain.com. I searched for .htaccess in several locations that I googled, I also tried executing "find / -type d -name '.htaccess'" on PuTTy, but it gives no results.
When I open my site in a browser and I point the URL to specifically // ipaddress / location A it's all good. (Apache Server)..My problem is, if you open the site in a browser with just the IP address alone it goes there for a second and then automaticlly goes to and opens the other site in location // ipaddress / location B.
However, what I need it to do, I think, is edit the apache conf file to make it open location A as the default. What do I need to do in the apache (httpd-conf) to fix that? For that matter is that the right file to edit?
I would like to write a rewrite rule that does the following:
Redirect 301 URL...
So what I want is that the first url is rewritten to go to the second ..I have a whole bunch of links that I have to redirect, so I would like to place them all into one .htaccess file or into the default configuration file of apache. So what I do not want is to create SomeFolder1 and someOtherFolder2 and to place a .htaccess file into that place in order to make it work. In fact I want to ignore the folders of the old link and only use the pagename.