Is it possible to use ddclient on a raspberry pi for updating a custom host?
I use a own PowerDNS-Server that is being updated by a URL:
https://domain.tld/index.php?domain=<domain>&ipaddr=<ipaddr>&passwd=<pass>&ip6addr=<ip6addr>
When I try to configure ddclient I'm not quite able to implement this unique URL. I am only able to set the basic parameters:
protocol=dyndns2
usev6=if, if=eth0
if-skip=Scope:Link
ssl=yes
server=server.tld
login=username
password=topsecret
domain.tld
Obviously, this is not working with my URL.
Might it work if I change my variables in my URL to a ddclient compliant? From domain to host, e.g.?
What other ideas are there to make that work? I just need that link to being accessed by ddclient.
Thanks!
you can use script option in ddclient.conf file specifying the script (the part between the server and domain=<domain>&ipaddr=<ipaddr>&passwd=<pass>&ip6addr=<ip6addr>)
script=/index.php
Hope this helps
Related
can any body help me I want to change this code to thymeleaf ?
You shouldn't need ${contextRoot} anymore.
<a th:href="#{/show/category/{id}(id=${category.id})}"></a>
Sometimes it is a good practise to use a variable that stores the root-location. Think of a service that runs e.g. on localhost port 8080 BUT is accessible from the web over nginx behind the URL me.com/myService/ (port 80). In this use case # or contextRoot produces dead-links for end users since Thymeleaf doesn't know anything about that. My solution is to store e.g. "me.com/myService/" in the application properties and add this attribute by default to the model and build links like:
<a th:href="|${myRoot}/show/category/${category.id}|"></a>
If you don't need to handle things like that go with Metroids' answer, it's a good answer.
i am using "gulp-connect" as a development server and i am trying to implement react router 1.0.0-rc1.
Currently i am using "createHashHistory" which adds junk something like: ?_k=ckuvup in the URL, which is deliberate as defined in the document. I am ok with it until i am sending query strings along with URL and my link looks something like this with the junk appending just after the domain name rather then at the end:
http://localhost:8080/#/?_k=y754gg/jobs?latitude=27.686784000000003&longitude=85.2690875&query_location=Liverpool, United Kingdom&query=fjdkf
Expected URL (something like this) :
http://localhost:8080/#/jobs?latitude=27.686784000000003&longitude=85.2690875&query_location=Liverpool, United Kingdom&query=fjdkf/?_k=y754gg
I could have used "createBrowserHistory" which has a much clear URL but the problem is:
1) Server configuration. Example provided only shows how to do in Express. I am planning to use nginx in production and am using gulp-connect in development. As i could not find any reference on how to do in this servers i had to choose "createBrowserHistory".
2) My backend is on rails and if i through my front end in "public" folder, URL with # should separate client and server routes. But i keep on thinking there must be a way to use createBrowserHistory with some configuration in nginx.
My priority from this question is the first part on appending the key at the end. Any reference on how configuration are done in different server will be appreciated.
You should be able to disable the URL hash by setting queryKey: false when creating your history:
var history = History.createHashHistory({
queryKey: false
});
I found this example for using netscaler to rewrite requests to an internal server on a specific port.
set transform action trans_action_RSA_SS -priority 1000 -reqUrlFrom
"https://rsa.domain.public" -reqUrlInto
“https://rsa.domain.local:7004″ -resUrlFrom
"https://rsa.domain.local:7004″ -resUrlInto
"https://rsa.domain.public"
I'd like to expand on the example to point the local destination at a vserver.
Assume my vserver is called INTERNALVSERVER and also assume that it
is configured as a load balancer in front of 3 nodes (I suspect the specifics of that are irrelevant to this situation).
I just want to ensure that my urltransform applies to my vserver properly. Conceptually I'm going for something like this:
set transform action trans_action_RSA_SS -priority 1000 -reqUrlFrom
"https://rsa.domain.public" -reqUrlInto
“https://INTERNALVSERVER:7004″ -resUrlFrom
"https://INTERNALVSERVER:7004″ -resUrlInto
"https://rsa.domain.public"
Apparently the example would work as advertised as long as https://rsa.domain.local points at a vserver/service group. So there's no need to change anything in the rules, just make sure "rsa.domain.local" or the equivalent for your setup is pointing to the right place.
Although above solution would work, from web-server's security perspective it's not good idea to do direct URL transformation of external URL to internal as it would make your internal web server vulnerable to denial of service attack. Also, if your web-admin has not secure web-server, SQL-injection would create big enough of problems for you.
Instead, I would suggest you to do LB and responders to pick/channel valid URL traffic and discard all other web-traffic.
The Orbeon Proxy Portlet allows form selection via URL parameters. It would be preferable if the parameters were not included in the URL. I thought I might be able to use a public render parameter as described in the Liferay documentation but it looks like the proxy portlet isn't configured that way.
Looking at OrbeonProxyPortlet.scala I see this method is used to retrieve the URL parameters:
private def portalQuery(request: PortletRequest) =
collectByErasedType[String](request.getAttribute("javax.servlet.forward.query_string")) map decodeSimpleQuery getOrElse Nil
Could this method be modified to combine that map with the map returned by PorletRenderRequest.getParameterMap() or PorletRenderRequest.getPublicParameterMap()?
Or perhaps there could be another init-param like enable-url-parameters, for example, enable-inter-portlet-parameters?
This would also require the following configuration in the portlet.xml:
<supported-public-render-parameter>orbeon-app</supported-public-render-parameter>
<supported-public-render-parameter>orbeon-form</supported-public-render-parameter>
<supported-public-render-parameter>orbeon-document</supported-public-render-parameter>
<supported-public-render-parameter>orbeon-page</supported-public-render-parameter>
As you noticed, currently this is not implemented, and I don't think there is a way without modifying the code of OrbeonProxyPortlet.scala. But yes, it would make sense to make this work, and in fact the option was considered in issue #1850.
What is the method I need to call to find the root URL for a rails application. For example, I have a site where the address is "https://host:1234/foo/app-main".
What method should I be using to get "https://host:1234/foo/images" to get the absolute url for images in the public url?
image_path(image_name)
Edit: Steve has a good point, this will only get you part of the way there. To get the rest you must be inside of a request (you probably are)
In that case though, you can combine the above with Justice's approach,
"#{request.scheme}://#{request.host_with_port}/#{request.script_name}#{image_path(image_name)}"
This question makes sense only on a per-request basis, since your one process might easily be listening on multiple domain names and on multiple schemes.
"#{request.scheme}://#{request.host_with_port}#{request.script_name}"
See Rack::Request.