-
Notifications
You must be signed in to change notification settings - Fork 5
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
DynDns1 / DynDns2 updates #4
Comments
Where exactly did you add the nginx rewrites? It's possible that your vhost does not forward the correct
In my experience this is included in the default parameters of an nginx installation ( In addition, the IP 127.0.0.1 also means the script is not getting the real remote IP. If I find some time I will set up an nginx installation and create appropriate documentation. If you can provide more details about your configuration, this would help. |
On the same server nginx is setup as proxy (managed by ISPConfig as webserver) in front of ISPConfig. I use a custom nginx directive because of the rewrites:
/etc/nginx/nginx.conf has been updates with these lines:
so ISPConfig logs now show real IP instead of 127.0.0.1 As far as fastcgi goes, if vhost wouldn't forward correct REQUEST_URI to php then there would be tons of other problems which there are not. |
OK I see, so because you are rewriting the URL before sending it to ispconfig upstream, the original REQUEST_URI is lost. Can you check if it's possible to rewrite the URL in ispconfig directly, instead of on the revese proxy? Otherwise I will need to implement a workaround for this use case. |
The original REQUEST_URI isn't lost at all. If the REQUEST_URI would be lost than the hostname to update in the DNS would be lost too. I've done some more testing. |
To show REQUEST_URI is not lost are these redacted logs: Access log proxying vhost: Access log ISPConfig: |
The query parameters are not lost, but the path is. I created a local test install with nginx+ispconfig to work on a solution. |
I see what you mean now. Why not only check the parameters in the query? Another option when using a (nginx) proxy could be letting it add a custom header to be checked for as alternative for the missing path. |
I opted for the custom header as this will be more reliable. Can you try the latest Release (1.2.3), with the following new header:
I have also created a small guide for nginx here: https://github.com/mhofer117/ispconfig-ddns-module/wiki/Setup-Proxy-Domain-(nginx) In case you are using ispconfig for shared hosting, I suggest you disable set_real_ip_from in /etc/nginx/nginx.conf again and use the suggested configuration instead. Let me know if you run into other issues or if it works. |
An even better solution than I had in mind! Added the header in proxy vhost and replaced DdnsUpdater.php Seems to be working like a charm! In /etc/nginx/nginx.conf you want I've read your proxy page in the wiki and have a few remarks on that. You also asked for multiserver feedback in the readme. |
Just keep in mind that this allows everything running on your system to spoof client IPs. That is why I won't recommend it and am personally running my ISPConfig instances on port 443 directly.
The provided snipped works as-is. You could add that to your standard domain without proxying the complete ISPConfig instance. Anything more is up to the individual administrator. You are right that the .htaccess is more granular than a
Thank you for the feedback, good to hear that it works in multiserver setups! Is it really required to add the DB table to the member servers?
Are you willing to provide some screenshots of your Draytek configs for another examples wiki page? |
Thank you for providing the screenshot and clarification on the multi-server setup! |
Hi there, i am having problems to get this to run with my FritzBox 7590. I can update the A-record correctly with the simple method URL but it is not updating the A-record via the fritzbox. In the DynDNS Section of the fritzbox i have this: Update-URL: i put the URL from "DynDns1 / DynDns2 updates" which looks like this: Domainname: subdomain.domain.tld I dont know why it is not updating the a-record. What might i be doing wrong or how could i debug this? |
Hi @glowfishDE
|
Sure :) Will do. Thanks Marcel. |
DynDns1 / DynDns2 updates are not working properly.
IP of hostname is set to 127.0.0.1 in DNS despite the correct myip value being sent by the router.
I use Nginx as webserver so the .htaccess file in /nic does nothing.
It's replaced by this in the vhost config:
which rewrites
to
Proven by the ispconfig access log that shows the correct rewritten uri.
The text was updated successfully, but these errors were encountered: