Home > Virtual Host > Apache Documentroot Not Working

Apache Documentroot Not Working

Contents

I made a user and was planning to serve all the files from his home folder, however I suppose i can look into giving him access to the /var/www/html folder to Not setting a ServerName in a virtual host. It had the welcome.conf file, which only contained one small directive. However, it is additionally useful to use * on systems where the IP address is not predictable - for example if you have a dynamic IP address with your ISP, and weblink

This yields a nice "Could not bind to port" error on start up. Example: NameVirtualHost *:443 ServerName some.domain.com # SSL options, other options, and stuff defined here. ServerName some.domain2.com # SSL options, other options, and stuff defined here. See Are you sure you want to unaccept it? If the request contained an unknown or no Host: header it is always served from the primary name-based vhost (the vhost for that address/port appearing first in the configuration file). https://www.digitalocean.com/community/questions/apache-virtual-host-not-pointing-to-right-documentroot

Apache Namevirtualhost

Join Date Sep 2007 Location USA Beans 329 DistroUbuntu 13.10 Saucy Salamander Apache Name-Based Virtual Host Not Pointing I have a typical setup on my server with two Virtual Hosts. I can install or configure whatever necessary to do this. –Leng Jan 21 '14 at 22:25 The reason it is not working for you is because you do not asked 2 years ago viewed 2160 times active 2 years ago Linked -1 HTTPS only on subdomain 0 SSL on Subdomain Only Related 11How do I change the document root of

Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the LogLevel warn CustomLog ${APACHE_LOG_DIR}/access.log combined Alias /doc/ "/usr/share/doc/" Options MultiViews FollowSymLinks AllowOverride None Order deny,allow Deny from all Allow from 127.0.0.0/255.0.0.0 ::1/128 I have /etc/apache2/mods-enabled/dir.conf: Not the answer you're looking for? Apache Virtual Host Directory The problem being that the htaccess file will still be ignored because the AllowOverride is set in the wrong block.

Adv Reply September 16th, 2013 #2 bkline View Profile View Forum Posts Private Message Visit Homepage Quad Shot of Ubuntu Join Date Mar 2006 Location Arlington VA USA Beans 431 Apache Virtual Host Not Working The AllowOverride All stanza would allow the reading of that file, which is an Apache dynamic configuration file for that directory. The server machine has two IP addresses (192.168.1.1 and 172.20.30.40). I commented it out and it now works.

You are however right on the money, as this is my first server, and I am entirely new to this. –rip jerry Jan 18 '15 at 2:14 @ripjerry: could Apache Default Virtual Host Encasing a star in a perfect insulator How can I ensure my Playstation 2 will last a long time? Coworker throwing cigarettes out of a car, I criticized it and now HR is involved How do we know that Kalendae is the first day of a month? Community Tutorials Questions Projects Tags Newsletter RSS Distros & One-Click Apps Terms, Privacy, & Copyright Security Report a Bug Get Paid to Write Almost there!

Apache Virtual Host Not Working

Listen 172.20.30.40:80 Listen 172.20.30.40:8080 Listen 172.20.30.50:80 Listen 172.20.30.50:8080 DocumentRoot "/www/example1-80" ServerName www.example.com DocumentRoot "/www/example1-8080" ServerName www.example.com DocumentRoot "/www/example2-80" ServerName www.example.org http://www.sitepoint.com/forums/showthread.php?364435-Apache-Config-Document-Root-not-taking Code: NameVirtualHost * ServerName www.domain1.net ServerAdmin [email protected] DocumentRoot /var/www/www.domain1.net/ Options FollowSymLinks AllowOverride None Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all Apache Namevirtualhost P.S. Namevirtualhost Has No Effect If someone could explain why noelforte.com was running as default-000 as seen here: port 80 namevhost noelforte.com (/etc/apache2/sites-enabled/000-default:1) that would help shed some light on what may have been misconfigured.

Not the answer you're looking for? have a peek at these guys Thanks a bunch nerdtron. IP-based virtual hosting Mixed port-based and ip-based virtual hosts Mixed name-based and IP-based vhosts Using Virtual_host and mod_proxy together Using _default_ vhosts Migrating a name-based vhost to an IP-based vhost Using How do I deal with my current employer not respecting my decision to leave? Apache Virtual Host Example

No matching NameVirtualHost some.domain.com line. # Options and stuff defined here. # This would be correct. ServerName some.domain.com # Options and stuff defined here. Why is Your server has multiple hostnames that resolve to a single address, and you want to respond differently for www.example.com and www.example.org. Yes, I'm sure. check over here There has to be a solution for this, and I'm sure this community has someone who knows what it is. –Leng Jan 21 '14 at 22:18 Of course there

Using the ServerPath directive We have a server with two name-based vhosts. _default_ Virtualhost Overlap On Port 80, The First Has Precedence Adv Reply September 17th, 2013 #5 nerdtron View Profile View Forum Posts Private Message Visit Homepage Brain Blast! In the context of virtual hosts, the ServerName # specifies what hostname must appear in the request's Host: header to # match this virtual host.

Listen 80 # This is the "main" server running on 172.20.30.40 ServerName server.example.com DocumentRoot "/www/mainserver" DocumentRoot "/www/example1" ServerName www.example.com # Other directives here ... DocumentRoot "/www/example2"

While you can use a "NameVirtualHost some.domain.com/" combination, it doesn't make much sense and is not generally used... It's where your webserver will point if there's no virtualhost defined for the site you're looking up. For instance, using *:80 means all interfaces on port 80. Apache 2.4 Virtualhost umlaute not rendered correctly Is adding the ‘tbl’ prefix to table names really a problem?

My boss asks me to stop writing small functions and do everything in the same loop A question about the CE amplifier Citing work with a publication year in the future These scenarios are those involving multiple web sites running on a single server, via name-based or IP-based virtual hosts. Available Languages: en | fr | ja | ko | tr CommentsNotice:This is not a Q&A section. http://da4design.com/virtual-host/apache-subdomain-not-working.php US Election results 2016: What went wrong with prediction models?

You must have the names in DNS, resolving to your IP address, or nobody else will be able to see your web site. Thanks for the suggestions though, Apr 3, 2006,23:06 #8 talence View Profile View Forum Posts SitePoint Addict Join Date Mar 2006 Location Tux Posts 269 Mentioned 0 Post(s) Tagged 0 Thread(s) Share your knowledge. SSL section in apache does not work without the key and certificate information.

Sign into your account, or create a new one, to start interacting. more stack exchange communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed It didn't work if it is not there. In the example above, what might have been attempted was being able to use htaccess in the DocumentRoot.

Contents Common Apache Misconfigurations Name Based Virtual Host Not matching the value of NameVirtualHost with a corresponding block. I have a simple index.html in my /extracurricular.com directory apache2 share|improve this question asked Jan 17 '15 at 6:02 rip jerry 164 add a comment| 1 Answer 1 active oldest votes Here is the output of ls -l /home/test/www: total 1816236 -rw-r--r-- 1 root www-data 3 Jun 3 10:09 index.html -rw-r--r-- 1 ubuntu www-data 53 Mar 4 16:55 index.php drwxrwsr-x 5 ubuntu Quine Anagrams! (Cops' Thread) Delimiters around Array Why Would the President-elect have a Transition Visit before December 19?

Browse other questions tagged ubuntu apache-httpd apache-virtualhost or ask your own question.