Solved

How to configure zend ce for subdomain access?

Posted on 2012-03-20
8
306 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
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 

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

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.

Question has a verified solution.

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

One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
This article discusses four methods for overlaying images in a container on a web page
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
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 …

828 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