snipt

Ctrl+h for KB shortcuts

Text only

Virtual Host

1
2
3
4
5
6
7
8
9
<VirtualHost *:80>
    DocumentRoot "/var/www/upvote/frontend/web"
    ServerName example.com
    ServerAlias www.example.com
    <Directory "/var/www/upvote/frontend/web">
    	Options +FollowSymlinks +Indexes
		AllowOverride All
    </Directory>
</VirtualHost>
https://snipt.net/embed/d4504df5366dce64de3c232ddb74cf74/
/raw/d4504df5366dce64de3c232ddb74cf74/
d4504df5366dce64de3c232ddb74cf74
text
Text only
9
2024-05-20T03:54:03
True
False
False
/api/public/snipt/22/
virtual-host
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a> <a href="#L-7">7</a> <a href="#L-8">8</a> <a href="#L-9">9</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>&lt;VirtualHost *:80&gt; </span><span id="L-2"><a name="L-2"></a> DocumentRoot &quot;/var/www/upvote/frontend/web&quot; </span><span id="L-3"><a name="L-3"></a> ServerName example.com </span><span id="L-4"><a name="L-4"></a> ServerAlias www.example.com </span><span id="L-5"><a name="L-5"></a> &lt;Directory &quot;/var/www/upvote/frontend/web&quot;&gt; </span><span id="L-6"><a name="L-6"></a> Options +FollowSymlinks +Indexes </span><span id="L-7"><a name="L-7"></a> AllowOverride All </span><span id="L-8"><a name="L-8"></a> &lt;/Directory&gt; </span><span id="L-9"><a name="L-9"></a>&lt;/VirtualHost&gt; </span></pre></div> </td></tr></table>
apache
--- 
+++ 
@@ -2,8 +2,6 @@
     DocumentRoot "/var/www/upvote/frontend/web"
     ServerName example.com
     ServerAlias www.example.com
-    ErrorLog ${APACHE_LOG_DIR}/error.log
-    CustomLog ${APACHE_LOG_DIR}/access.log combined
     <Directory "/var/www/upvote/frontend/web">
     	Options +FollowSymlinks +Indexes
 		AllowOverride All
--- 
+++ 
@@ -5,6 +5,7 @@
     ErrorLog ${APACHE_LOG_DIR}/error.log
     CustomLog ${APACHE_LOG_DIR}/access.log combined
     <Directory "/var/www/upvote/frontend/web">
+    	Options +FollowSymlinks +Indexes
 		AllowOverride All
     </Directory>
 </VirtualHost>
--- 
+++ 
@@ -0,0 +1,10 @@
+<VirtualHost *:80>
+    DocumentRoot "/var/www/upvote/frontend/web"
+    ServerName example.com
+    ServerAlias www.example.com
+    ErrorLog ${APACHE_LOG_DIR}/error.log
+    CustomLog ${APACHE_LOG_DIR}/access.log combined
+    <Directory "/var/www/upvote/frontend/web">
+		AllowOverride All
+    </Directory>
+</VirtualHost>