Questions tagged [documentroot]
97 questions
3
votes
3 answers
How to configure Apache document root?
I am in the process to migrate to a new web server and I would like to have a clean and safe file architecture for apache and my web application.
The server will serve one single php/mysql application. This application receive files from FTP and…

benjisail
- 1,331
- 5
- 19
- 32
3
votes
1 answer
Nginx - difference between root and alias?
My goal is to have a Laravel installation running alongside a Nuxt application generated as static content.
I'd like for Laravel to be available, when the location start with /api. This works as expected.
For any other requests, I'd like to have…

Repox
- 265
- 1
- 3
- 14
2
votes
1 answer
How to edit files from localhost via lynx?
I want to optimize a site for viewing with lynx.
If I view any HTML file from outside of the DocumentRoot, I am able to edit and save these files inside lynx with keystroke e, which invokes vim.
Accessing files from localhost with lynx…

John Goofy
- 129
- 5
2
votes
2 answers
Apache ErrorDocument script location
Using apache 2.4 on Linux, with several virtual servers, each virtual server with its own DocumentRoot, I would like for the apache main server ErrorDocument local redirect to execute a single perl script relevant to the apache main DocumentRoot,…

keith20mm
- 31
- 1
- 2
2
votes
1 answer
Apache Serving Wrong Document Root
I have installed SSL on a subdomain of my site. Everything works perfectly, except this strange behavior.
If I point my browser at the following locations, these document roots are served:
http://domain.com -> /var/www …

Leng
- 125
- 1
- 5
2
votes
1 answer
Is there anything wrong with making your documentroot tmpfs, if you've got the ram to spare?
As the title says, it strikes me that if I have an old mason webapp which is basically a few hundred perl scripts and components on disk, would it not run quicker if I made the documentroot a tmpfs?
I know mason does some caching, but there's little…

pacifist
- 181
- 6
2
votes
2 answers
Can a S3 mount be used as the document root for Apache?
Has anyone been successful in having their DocumentRoot reside on an S3 mount (using s3fs)?
I currently have a mounted bucket at /mnt/s3. I can read and write files to it no problem.
In my httpd.conf I have DocumentRoot "/mnt/s3".
When I restart…

Hesse
- 21
- 1
- 2
2
votes
4 answers
Sharing the same document root - except for a folder and a file
I have two websites, websitea and websiteb.
I have them both pointing to the same document root and all works fine, however I want websitea to have different db details to websiteb.
Database details are stored in /config/database.php
I could just…

Wizzard
- 342
- 1
- 4
- 12
2
votes
1 answer
setting documentroot in apache
i've set the documentroot in httpd.conf as:
DocumentRoot "C:\Users\user1\Documents\WebProjects"
if the files are located in WebProjects, they work; however if i create a sub folder [project] in WebProjects and access them via the browser, it…

input
- 123
- 4
1
vote
1 answer
Apache Redirect without include document root in rewrite rule
I have this working rule:
RewriteRule ^(.*)/amp/$ https://example.com/$1?amp=1 [QSA,R=301,NC,NE,L]
For redirecting https://example.com/register/amp/ to https://example.com/register?amp=1.
And it is working well, but I would like that the URL in the…

shakaran
- 356
- 1
- 7
- 19
1
vote
1 answer
Apache: why always showing files from the same virtual host?
I have set up 2 virtual hosts, sharing the same IP address:
DocumentRoot "/var/www/vhosts/website1.com/httpdocs"
ServerName www.website1.com
DocumentRoot…

Daniele B
- 367
- 1
- 4
- 14
1
vote
1 answer
DocumentRoot takes one argument, Root directory of the document tree error
Ok so I have this linux OS on my pc xubuntu and the external IP is not working via internal or external network, not working either on my pc. Just says 404 not found. What can I do?
this is the 000-default.conf, I also tried…

thebestuser
- 11
- 1
- 3
1
vote
1 answer
Accessing phpmyadmin in Nginx directly from IP address (without a subdomain)
In an Ubuntu 16.04 Nginx environment which has some sites working fine, I've installed phpmyadmin:
cd /var/www/html
wget https://www.phpmyadmin.net/downloads/phpMyAdmin-latest-all-languages.zip
find ./ -type f -iname '*phpmyadmin*.zip' -exec unzip…

Arcticooling
- 1
- 3
- 7
- 22
1
vote
1 answer
Duplicated version of a local (WordPress) site isn't available online in an Nginx environment
In my Ubuntu 16.04 Nginx environment I tried to create an online test version of a local WordPress site. The original site works fine and is accessed in HTTPS (the lock favicon is green in all pages).
My current state and problem
When I browse into…

Arcticooling
- 1
- 3
- 7
- 22
1
vote
1 answer
DocumentRoot and htaccess files
I have a muluitple vhosts set up all with the same DocumentRoot pointing to a common set of files, I have set up AliasMatch for for the bespoke files on each site, I was wondering if I can have a .htaccess file for each vhost.
#Sample…

icelizard
- 732
- 3
- 10
- 20