{"id":112,"date":"2010-01-27T14:32:44","date_gmt":"2010-01-27T14:32:44","guid":{"rendered":"http://blog.divydovy.com/?p=112"},"modified":"2020-01-23T10:30:15","modified_gmt":"2020-01-23T10:30:15","slug":"vps-hosting-wordpress-and-flat-websites-together-with-apache","status":"publish","type":"post","link":"https://www.divydovy.com/2010/01/vps-hosting-wordpress-and-flat-websites-together-with-apache/","title":{"rendered":"VPS: Hosting WordPress and Flat Websites Together with Apache"},"content":{"rendered":"<p><strong>UPDATE: Um. Turns out this isn&#8217;t the best way to do this. See my <a title=\"Take #2\" href=\"/web/vps-hosting-wordpress-and-flat-websites-together-with-apache-2/\">second attempt here</a></strong><strong>.</strong></p>\n<p>I have my own Virtual Private Server (VPS) on which I use the excellent <a title=\"Installing Multiblog on a VPS\" href=\"http://blog.divydovy.com/web/hello-world/\">Virtual Multiblog</a> (d&#8217;oh &#8211; still haven&#8217;t finished that post) to host multiple WordPress sites on one server. I then wanted to consolidate some other sites I&#8217;m responsible for onto this VPS and save some hosting fees. I didn&#8217;t want to rewrite them as WordPress blogs though, and that left me trying to figure out how to host both types of site on one server using WAMP.</p>\n<p>I couldn&#8217;t find a tutorial to do this anywhere, so here&#8217;s a go. I&#8217;m using Apache v2.2.11, and distinguishing between domain names, rather than IP addresses.</p>\n<p><strong>*Disclaimer: I&#8217;m not (and don&#8217;t claim to be) an expert. This could break things, upset your granny or otherwise not do what you want. I&#8217;m happy to receive corrections or improvements &#8211; or thanks if it works for you!*</strong></p>\n<p>First, in Apache&#8217;s httpd.conf, enable the VirtualHosts include by changing:</p>\n<blockquote><p># Virtual hosts<br />\n#Include conf/extra/httpd-vhosts.conf</p></blockquote>\n<p>to</p>\n<blockquote><p># Virtual hosts<br />\nInclude conf/extra/httpd-vhosts.conf</p></blockquote>\n<p>Now, edit httpd-vhosts.conf to include a VirtualHost for your domain, e.g.</p>\n<blockquote><p>#<br />\n# Use name-based virtual hosting.<br />\n#</p>\n<p>NameVirtualHost *:80</p>\n<p>&lt;VirtualHost *:80&gt;<br />\nServerAdmin &lt;you@email.com&gt;<br />\nServerName theflatdomain.com<br />\nServerAlias *.theflatdomain.com</p></blockquote>\n","protected":false},"excerpt":{"rendered":"<p>I have my own Virtual Private Server (VPS) on which I use the excellent Virtual Multiblog (d&#8217;oh &#8211; still haven&#8217;t finished that post) to host multiple Wordpress sites on one server. I then wanted to consolidate some other sites I&#8217;m responsible for onto this VPS and save some hosting fees. I didn&#8217;t want to rewrite them as Wordpress blogs though, and that left me trying to figure out how to host both types of site on one server using WAMP.</p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_uag_custom_page_level_css":"","clkt_auto_upload":"0","_clkt_publish_and_upload":false,"_jetpack_memberships_contains_paid_content":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":3,"activitypub_interaction_policy_quote":"","activitypub_status":"","footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_wordproof_timestamp":false},"categories":[7],"tags":[11,24,35,42,58,110,114,125],"my_content_publications":[],"class_list":["post-112","type-post","status-publish","format-standard","hentry","category-web","tag-apache","tag-config","tag-domains","tag-flat-sites","tag-htaccess","tag-virtual-private-server","tag-vps","tag-wordpress"],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":6}},"clkt_attachments":{"featured_image":null,"inline_attachments":[],"upload_candidates":[],"max_free_size":102400,"max_allowed_size":104857600},"_clkt_upload_mode":"new_only","clkt_content_hash":"e6091422cbf524c5ec1ee270de8e2c916f5fdb0e5f1373c5b3b4f29c371e58c0","customFields":{"clkt_auto_upload":"0","activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":3,"activitypub_interaction_policy_quote":"","activitypub_status":"","footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"processed_attachments":{"total_attachments":0,"uploaded_to_arweave":0,"kept_original_urls":0,"upload_summary":{"total":0,"uploaded":0,"failed":0,"too_large":0,"reused":0}}},"paymentAddress":"8_-tV4d15kVVq9Gd-Al2MAIC3LqNtJ_KgFol71TzxPw"}