Reputation: 565
I don't need redirecting or what-not, just a strict plain copy -- a second directory that works 100% the same as the first one (I need it say as a starting point for a new project).
I did the following (names are slightly different, below I use "a" and "b"):
a) under /var/www :
sudo rsync -rpuva a/ b
b) under /etc/apache2/sites-available:
sudo cp -p a b
c) edited "b" so that "diff a b" gives me:
:: <Directory /var/www/a/
:: >Directory /var/www/b/
(Sorry but I cannot quite figure out how to properly escape LT(<), GT(>) and SLASH(/) above. When I made it look OK, SO complained saying "your code is not formatted properly" (and where is code?!?!) ).
d) restarted apache
However when I open in browser my-site/a/script.cgi it welcomes me with a hello message while my-site/b/script.cgi gives me the content of it
The script.cgi is:
#!/usr/bin/env python
print "Content-type: text/html"
print ""
print "<h1>Hello from Python!</h1>"
There are no errors in the log.
I run Linux #29-Ubuntu SMP Wed Apr 17 18:19:42 UTC 2013 and Apache
Server version: Apache/2.2.22 (Ubuntu) Server built: Mar 15 2013 14:04:36
I don't see how this can be possible. Please help!
Note: I restart using both apachectl and apache2ctl : maybe that is the problem?
Upvotes: 2
Views: 107