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

local.conf #153

Closed
mrvimalsingh opened this issue Aug 23, 2014 · 16 comments
Closed

local.conf #153

mrvimalsingh opened this issue Aug 23, 2014 · 16 comments
Labels

Comments

@mrvimalsingh
Copy link

Hello Sir ,

Thanks for the awesome installer , must appreciate your hard work ...

I got an issue , if you have some free time , kindly reply me
after every one day local.conf is resetting .. all the modification turns default provided by your installer ..

is there anything wrong by my side or ... something has to do for prevention

Thanks & Regards

Vimal Singh

@JoshData
Copy link
Member

Hello,

If I understand your question, you're saying that you are modifying the nginx config and then your changes are being lost?

This is by design. Configuration files created by Mail-in-a-Box are maintained by Mail-in-a-Box and cannot be edited. The box can't be used for anything else besides Mail-in-a-Box.

@mkropat
Copy link
Contributor

mkropat commented Aug 23, 2014

It might make sense to rename local.conf to mailinabox.conf or something along those lines. There's no confusion that Mailinabox owns Postfix's master.cf file (to pick one example), but a file named local.conf implies (to me at least) that the system admin is free to customize the file at will.

@JoshData
Copy link
Member

Fair point. Submit a pull request?

@skosch
Copy link
Contributor

skosch commented Aug 23, 2014

If I absolutely wanted to extend my nginx config to add more paths and I only have one machine to work with (since the Dockerized version doesn't work yet), how would you suggest I should go about that? Could I shut down Mailinabox's nginx for good and run my own (with an extended configuration), say in a Docker container? Are there other reasons besides the nginx conf auto-update that Mailinabox should be absolutely alone on the machine?

@JoshData
Copy link
Member

I don't want to seem callous, but I just don't have the time to get into things out of scope for the project, sorry.

@JoshData
Copy link
Member

I had no idea until after closing the issue that the three comments on this thread were from different people. :-| Sorry I was being a little oblivious, guys!

@skosch
Copy link
Contributor

skosch commented Aug 23, 2014

No problem Josh, I understand your concern. Mailinabox is a really, really fantastic project, and the fact that it essentially renders a machine unusable for anything but a few static pages is unfortunate. If you can confirm that it's really just the nginx configuration causing this problem then I'll try to find a minimally-awful way around it and report back.

@JoshData
Copy link
Member

It renders a machine usable for mail, thank you very much. :-P

Please see:
https://github.com/mail-in-a-box/mailinabox/blob/master/management/web_update.py#L98

@skosch
Copy link
Contributor

skosch commented Aug 23, 2014

Hahaha, point taken! This is precisely what I was looking for, many thanks 👍

@mrvimalsingh
Copy link
Author

please suggest the solution .. how can i add custom lines .. for ssl and php and where ...

@skosch
Copy link
Contributor

skosch commented Aug 24, 2014

@mrvimalsingh, he's added a provision for a file called custom.yaml which you should place in /home/user-data/www/ (at least that's where mine went). If you format it like this:

mydomain.com:
    proxies:
        /awesomeapp: http://localhost:12345
        /coolapp: http://localhost:54321

... then the following will be added to the mydomain.com server block:

location /awesomeapp {
    proxy_pass http://localhost:12345;
}
location /coolapp {
    proxy_pass http://localhost:54321;
}

@JoshData This is cool, but doesn't go quite far enough for me (I need proxy_redirect etc.). Would you be open to discussing the following change: instead of (or in addition to) reading in a YAML, we put a include [servername].conf line inside each server block (and maybe a global one outside), and the users can then go and add stuff to those files to their hearts' content?

@skosch
Copy link
Contributor

skosch commented Aug 24, 2014

PS. I've tried the above, and it works well so far. I'm happy to open a pull request if you're interested.

@JoshData
Copy link
Member

We could also just set proxy redirect default by default if that will help.

Otherwise, sure, submit a pr!

@skosch
Copy link
Contributor

skosch commented Aug 24, 2014

Yeah, that should work in most cases, but not all (e.g. I just had to add Jenkins to our box, and it needs all kinds of exotic headers and other stuff). See #156 for the change I made. Thanks Josh!

@keehun
Copy link

keehun commented Oct 25, 2014

Do I understand correctly that in order to use PHP and whatnot, I have to set up the YAML configuration and then have nginx listen to another port?

@JoshData
Copy link
Member

None of the stuff discussed in this thread is something I really support. You're on your own if you try to hack the box to do these things.

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

No branches or pull requests

5 participants