Solved

How to configure zend ce for subdomain access?

Posted on 2012-03-20
8
305 Views
Last Modified: 2012-03-25
Dear sir,
How to configure zend server ce version(appache) to support web access via following manner:
"http://webmail.xxxx.com   ==  http://www.xxxx.com/webmail/
"
Please give me detail information on how to do this.

Thanks!
0
Comment
Question by:matiascx
  • 4
  • 4
8 Comments
 
LVL 51

Expert Comment

by:ahoffmann
ID: 37750316
in apache's configuration file use:

RewriteCond %{REQUEST_URI} !^/webmail/
RewriteRule ^$ /webmail/ [L]
0
 

Author Comment

by:matiascx
ID: 37750713
Sorry, I am a green hand, can you give me more explaination on how to do that and the meaning?

Thanks!
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 37751399
you need to find your apache's configuration file, it's usually named apache.conf or httpd.conf
check if the configuration loads the mod_rewrite module, if not add proper directives to load it
in that file you need to find the proper <directory> directive for the root directory
in that <directory scope you place:
  RewriteEngine On
  RewriteCond %{REQUEST_URI} !^/webmail/
  RewriteRule ^$ /webmail/ [L]

the meaning is that any request which is not /webmail/ (RewriteCond directive) will be rewritten to /webmail (RewriteRule directive)

i.g. this is not the place to explain completely how apache configuration works, there exist dozend of books and million of websites doing it ;-)
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:matiascx
ID: 37753033
For following description:

the meaning is that any request which is not /webmail/ (RewriteCond directive) will be rewritten to /webmail (RewriteRule directive)

It seems that it is not right? Maybe should be any request which is webmail.xx.xx will be rewritten to xx.xx/webmail

Is my understanding right?
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 37754916
> Maybe should be any request which is webmail.xx.xx
is this what your wish/expect, or what you mean what my rule does?
0
 

Author Comment

by:matiascx
ID: 37756373
Just because your explaination is not same with my expect or understanding.
I am not sure whether or not it is your mis-writing or my knowledge is error.
Can you clarify the rewrite rule in more detail explaination?
0
 
LVL 51

Accepted Solution

by:
ahoffmann earned 500 total points
ID: 37756687
# make a condition for the rewrite:
# check if the URL (which is in the variable %{REQUEST_URI) matches /webmail/ at the beginning (beginning: ^)
# if it does *not* match the condition is true

  RewriteCond %{REQUEST_URI} !^/webmail/

# now, if the condition above was true do the rewrite:
# rewrite an emtpy URL (beginning ^ immediately followed by the end $ ) to /webmail/
# if done, don not continue with rewriterules [L]



  RewriteRule ^$ /webmail/ [L]
0
 

Author Closing Comment

by:matiascx
ID: 37762844
Thanks!
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question