Hi Forum,
I came across few things regarding apache conf file management using virtualmin
Following problems encounter:
1st Issue:
I am running cygwin mirror, so I require a directory index listing to be shown rather than index.html file, if I follow a standard generic way, I create a site, & then I open browser, type the site, it will give me deny error, why? because index.html file is not yet created, so I need to create an index html file & then I refresh site in browser it will display my index.html file. But in my case because I am running cygwin mirror, I need to display directory index. That mirror is used internally for fast LAN based access install otherwise a full cygwin install on a very fast link still require a good one hour, on LAN it is just 20 minutes.
I did the following steps.
a. click on cygwin sub-domain, click on services, click on configure website, click on Directory Indexing & from there I click two things, I click on Directory Index Options Select Below & I tick mark Display fancy directory indexes, click save, click on save again at the bottom of page.
Now two thing, it doesn’t say restart apache, I have to restart apache manually, even though I do restart apache, it will still not work, because if I check the conf file manually I will found the following
<Directory /home/username/public_html/cygwin>
Options -Indexes +IncludesNOEXEC +FollowSymLinks
allow from all
AllowOverride All
I have to manually change the hyphen to plus symbol manually in-front of Indexes, plz look below on 2nd line & 2nd word, which says
Options +Indexes +IncludesNOEXEC +FollowSymLinks
<Directory /home/username/public_html/cygwin>
Options +Indexes +IncludesNOEXEC +FollowSymLinks
allow from all
AllowOverride All
Question is why this thing is not being implemented even though I have clicked on correct options?
2nd Issue:
Yesterday I came across a request from my department head to redirect entire web site to another site, a specific instruction was handed down to me, which states following.
I have to redirect three explicit urls to corresponding pages on destination site, why? Because if a user try to type these urls, they will still stand valid (these urls are regarding salesforce).
After these three urls, any other url should must be redirect to root of destination site.
One of three salesforce related url looks like this (I have changed this url) url we have got for sales force is permanent) remaining two urls were static urls, below url will open a page within our own site asking salesforce username & password & when you login in salesforce data & our site data will be displayed in one window.
http://login.our_domain.com/login.srf?wa=wsignin1.0&rpsnv=11&ct=1259710138&rver=6.0.5285.0&wp=MBI&wreply=http:%2F%2Flogin.salesforce.com%2Fdefault.aspx&lc=2057&id=64855&mkt=en-gb
Problem with above url is, I have used the following steps to redirect these links within virtualmin.
Select root domain, click on services, click on Configure Website, click on Aliases and Redirects, & under Permanent URL redirects
I have to specify source url in this shape
From:
/chubactivate/
To:
http://www.domain.com/chubactivate/"
I repeat above step for all links that I am redirecting, again when I click on save, virtualmin don’t prompt for apache restart, had to do it manually, because these redirect will not work, if apache is not restarted.
When I restart apache, two of the static urls will work, but the above complex url will not work.
When I check apache conf, I found following for redirected urls
RedirectPermanent /chubactivate/ “http://www.domain.com/chubactivate/”
RedirectPermanent /salesforce/ "http://login.our_domain.com/login.srf?wa=wsignin1.0&rpsnv=11&ct=1259710138&rver=6.0.5285.0&wp=MBI&wreply=http:%2F%2Flogin.salesforce.com%2Fdefault.aspx&lc=2057&id=64855&mkt=en-gb
1st redirect will work but 2nd redirect will not work
Now I did tried to google it & found this very strange bit of trick, which is logically wrong, but surprisingly it is working & that’s why I am confused?
To tell you that trick, before, I must tell you my apache version i.e.
Server: Apache/2.2.3 (CentOS)
In apache version 1.3
Trick is
Redirect Permanent /chubactivate/ “http://www.domain.com/chubactivate/”
There is a space between Redirect Permanent directive
When I apply this space on 2nd complex url, it start works, while actual syntax in Apache 2.2.3 is no spaces, I did apply this space manually, it is not possible to do it via web interface in virtualmin, when you apply this space, you can no longer see them under Permanent URL redirects on page Aliases and Redirects on configure website option under services.
I need to know why this is the case? can someone put some light on it, as this is not suppose to happen?
Thanks
-shuja