Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple virtual host configuration files #895

Closed
2case opened this issue Aug 28, 2015 · 7 comments
Closed

Multiple virtual host configuration files #895

2case opened this issue Aug 28, 2015 · 7 comments

Comments

@2case
Copy link

2case commented Aug 28, 2015

Currently it seems not possible to setup multiple virtual hosts configuration files. They will overwrite each other. Handling all virtual hosts configurations in one large file is not very organized.

I would also like something like <xi:include href="conf.d/*"/> to load all files in that directory.

@wick-ed
Copy link
Member

wick-ed commented Aug 31, 2015

Hi there @2case ,

you should be able to use several virtual hosts config files using a slightly different structure within the XML file.
Something along the lines of this:

<virtualHosts>
     <!-- include of virtual host configurations -->
     <xi:include href="conf.d/virtual-hosts-1.xml"/>
     <xi:include href="conf.d/virtual-hosts-2.xml"/>
     <!-- .... -->
</virtualHosts>

With your virtual host configurations only wrapped in a single virtualHost node each.

This might get a little clunky as the wildcard based syntax you would like is not supported by XInclude mechanisms.
We would love to see something like that as well.

Regards,

Bernhard

@smolinari
Copy link
Contributor

This is good to know! (and something else to add to the docs.) 😄

Scott

@2case
Copy link
Author

2case commented Aug 31, 2015

I tried that, but the XML Parser did not allowed the xi:include inside the virtualHosts node!

@wick-ed
Copy link
Member

wick-ed commented Aug 31, 2015

Hehe ^^
One of the reasons we are using XML for configuration is the manifold of tools and functions it offers.
You can use any of these with the appserver configuration so XInclude should work like it does in other XML files.

@2case , oh! Might be we restrict the type of the child nodes, I will check the schema. Sorry about that.

@wick-ed wick-ed added the bug label Aug 31, 2015
@2case
Copy link
Author

2case commented Aug 31, 2015

Hm missing the like button on your post... ah found the 👍

@wick-ed wick-ed added this to the Release 1.1.1 "Iron Knight" milestone Nov 23, 2015
@wick-ed
Copy link
Member

wick-ed commented Nov 24, 2015

Works as explained above in a local test with appserver version 1.1.0 "Iron Knight".

Example for appserver config in appserver.xml.

<!-- include of virtual host configurations -->
<virtualHosts>
    <xi:include href="conf.d/virtual-hosts-1.xml"/>
    <xi:include href="conf.d/virtual-hosts-2.xml"/>
</virtualHosts>

Example for virtual host configs.

<?xml version="1.0" encoding="UTF-8"?>
<virtualHost xmlns="http://www.appserver.io/appserver" name="test.dev">
    <!-- -->
</virtualHost>

Have a try with the current version. :)

@wick-ed wick-ed closed this as completed Nov 24, 2015
@smolinari
Copy link
Contributor

If I have some time, I'll play with this. I already have several virtual hosts set up for testing different things. Since I've started working with appserver, I haven't used any other server stack. LOL! The only thing missing is PHP debugging facilities. Once they are in, I'll be server in heaven! 😃

Scott

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants