Home > Virtual Host > Apache Documentroot Not Working

Apache Documentroot Not Working


Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. 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 I also have a virtual host for noelforte.com set up and enabled, however, it doesn't point to the document root defined in the vhost file. Polyglot Anagrams Cops' Thread more hot questions question feed about us tour help blog chat data legal privacy policy work here advertising info mobile contact us feedback Technology Life / Arts this contact form

How do I deal with my current employer not respecting my decision to leave? Modules | Directives | FAQ | Glossary | Sitemap Topics HTML CSS JS PHP Ruby Mobile UX Design Store Forums Subscribe Home Forum What's New? You may have to register before you can post: click the register link above to proceed. For the default virtual host (this file) this # value is not decisive as it is used as a last resort host regardless. # However, you must set it for any https://www.digitalocean.com/community/questions/apache-virtual-host-not-pointing-to-right-documentroot

Apache Namevirtualhost

I restart after every configuration change. Oddly enough, the subdomain I had configured with VHosts was still pointed to the right directory, however my main domain reverted to pointing at the default document root of /var/www. Read more about this at http://httpd.apache.org/docs/2.2/ssl/ssl_faq.html#vhosts2 Scope Adding/Restricting access and options in Example: # This was changed from the default of AllowOverride None.

You can use AliasMatch or RewriteRule to rewrite any request to a single information page (or script). _default_ vhosts for different ports Same as setup 1, but the server 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. Apache Virtual Host Directory I commented it out and it now works.

What happened? Apache Virtual Host Not Working Why were pre-election polls and forecast models so wrong about Donald Trump? Contents Common Apache Misconfigurations Name Based Virtual Host Not matching the value of NameVirtualHost with a corresponding block. https://wiki.apache.org/httpd/CommonMisconfigurations 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

Function to find all occurrences of substring Can series converge even if the general term does not have limit? Apache Default Virtual Host Start a coup online without the government intervening How do you simplify a log with an exponent in the base? What might cause a situation like this, and why then did it initially work properly? That's why I'm posting a question on ServerFault.com.

Apache Virtual Host Not Working

domain.com ServerName domain.com DocumentRoot /var/www sub.domain.com ServerName sub.domain.com:443 DocumentRoot /media/sub SSLEngine on SSLCertificateFile /etc/apache2/ssl/apache.crt SSLCertificateKeyFile /etc/apache2/ssl/apache.key What I've Tried It was suggested to me that http://www.sitepoint.com/forums/showthread.php?364435-Apache-Config-Document-Root-not-taking Please note that there is one oddity: A request to http://www.sub2.domain.tld/sub1/ is also served from the sub1-vhost if the client sent no Host: header. Apache Namevirtualhost Quine Anagrams! (Cops' Thread) Delimiters around Array Why Would the President-elect have a Transition Visit before December 19? Namevirtualhost Has No Effect A default vhost never serves a request that was sent to an address/port that is used for name-based vhosts.

The above configuration is what you will want to use in almost all name-based virtual hosting situations. weblink Can I sell a stock immediately? Example: NameVirtualHost *:80 # This would be correct. ServerName some.domain.com # Options and stuff defined here. # This is wrong. # Options and stuff defined here, ubuntu apache-httpd apache-virtualhost share|improve this question edited Jun 6 at 16:12 Jeff Schaller 10.9k61939 asked Dec 23 '13 at 7:44 Noel Forte 1281212 add a comment| 2 Answers 2 active oldest Apache Virtual Host Example

Atari 2600 high voltage output Start a coup online without the government intervening union of subset and span proof Add weight to one side of a see-saw to balance it Does Example: NameVirtualHost *:80 # This is wrong. It gives me this error: [error] Server should be SSL-aware but has no certificate configured [Hint: SSLCertificateFile] ((null):0) Thanks a lot in advance for any guidance. navigate here The RewriteRule directives are used to make sure that a client which sent a correct Host: header can use both URL variants, i.e., with or without URL prefix.

Would the members of an online imageboard (or any community) be able to build a post-apocalytic society upon their reputation? _default_ Virtualhost Overlap On Port 80, The First Has Precedence Another way to show convergence of well known series How to respond when someone praises about my Japanese? Can spacecraft defend against antimatter weapons?

Can I sell a stock immediately?

asked 4 years ago viewed 11257 times active 2 years ago Upcoming Events 2016 Community Moderator Election ends Nov 22 Linked 1 Cannot change apache document root Related 233Wildcards in a Add weight to one side of a see-saw to balance it Why can curcumin cross the blood-brain barrier, but not congo red? Mixing non-port and port name based virtual hosts. Apache 2.4 Virtualhost However, I've given up and have decided to serve all my files from the default directory since it'll only be my site.

In other words, I would like to safely redirect users from https://domain.com to http://domain.com. 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). Still not working, anyone run into this before? his comment is here Seemed like the easiest solution.

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 Using the same Listen and/or NameVirtualHost multiple times. Using the ServerPath directive We have a server with two name-based vhosts. Why do most microwaves open from the right to the left?

Join Date Aug 2009 Location Makati City, Philippines Beans 2,270 DistroXubuntu 16.04 Xenial Xerus Re: Apache Name-Based Virtual Host Not Pointing Here's my 3 domain setup and the contents of the For instance, using *:80 means all interfaces on port 80. Regards, DK David K. Such virtual hosts will only be used for HTTP requests received on connection to the specified IP address.