How to prevent Google from changing your /etc/hosts file when you restart the network service? - google-compute-engine

Whenever I change the /etc/hosts file and restart the network service, Google overwrites the file.

So, it is impossible to do. Your server does not directly contain a public IP address. Yes, this screws things up with certain pieces of software, such as ISPConfig. There literally is no way to run ISPConfig on Google currently. Thankfully several other web hosting control panels (cPanel and InerWorx) work with a little bit of hacky configuration. If you want to know how to configure them, reply below.

Related

With Keycloak, can you load an LDAP configuration from a file?

When I run Keycloak, I'd like it to load my LDAP configuration (user federation) automatically when it is run, so I don't have to enter it manually. Is there any way to do this with Keycloak? I'm using the containerized version 7.0.0, if it matters. I am also running in standalone mode. Thanks
You should be able to create your realm from a template that has your LDAP configuration in it.
From what I understand from your question, you want to use LDAP as your user Federation server, so you should have an LDAP up and running before starting your Keycloak container, and the container should start with the LDAP configuration.. to do this, I'll suggest a method that is a bit cumbersome at first, but it will give you a better grasp on how to configure Keycloak in the future.
Start by downloading keycloak from the website and run it without putting it in a container.. set up your Realm, clients and everything apart from the LDAP configuration.
Copy the Keycloak.json file outside of the directory, we're going to use that later
Get back to your web interface, configure your LDAP server, and save the configuration.
Now copy the keycloak.json file again, and place both versions in a text comparison tool, Diffmerge for example, and see the difference in the configuration related to your LDAP, that should be added to your container's keycloak.json.
A good practice using keycloak container is to create your whole configuration, and replace the default one, this way your container will start every time with your Realms, clients and all other pre-configured attributes.
OK so I think I figured it out. In Keycloak I had to export the realm via the standalone.sh script as specified in the documentation. Using the kcadm.sh admin CLI did not export the whole realm. Then I could import the realm using the admin CLI later. Thanks for your help it lead me to this answer.

Why do I get a 500 internal server error when trying to access an html file in public_html using cPanel/godaddy?

I have a godaddy website hosted through cPanel, but the html file, named test.html, will not appear when searching "website_name"/test.html. This is the contents of the file:
<!DOCTYPE html><head></head><body>TEST</body></html>
There is no .htaccess, although permissions are set to 644. The server displays the 500 error regardless of whether a valid address was entered. Additionally, the DNS domain and the actual ip address show different things: The DNS shows an index page I can't find in my public_html, whereas the ip shows the godaddy "Future home of something quite cool." message.
Background: I inherited this project as part of a new job. I can set up an apache server with php and mySQL support (in fact I went from using an xampp install to just running everything from command line for practice), but my employer has two godaddy domains: one made using a website building, and one using cPanel for which I am to write my own HTML, CSS, php, js, etc. I have searched extensively across godaddy, google and stack exchange, and have found nothing so far that has worked. The cPanel File Manager has a couple files in it, but nothing will open as a url (I can edit the files though). I checked the godaddy documentation and follow the tutorials and nothing has helped. Any help is appreciated. As an aside, I’m wondering if it would just be easier to completely restart the whole process? The html/css/php files are kind of a hodgepodge and would require rewrites anyway, and bootstrap is used as a source file in every one but never actually implemented. The environment is very relaxed so long as I’m working on something productive.

buildpublish to a different server

I am trying to use buildpublisher in the ccnet.config to copy some files over after the build. I am able to do this locally on the server but if I try to copy it over to another server that is on the same network it doesnt go. I think it has to do with security settings but I am not seeing anything in the Documentation about setting a user/pass security setting or anything. Any suggestions on what do do?
<buildpublisher>
<sourceDir>C:\Build\Publish\</sourceDir>
<publishDir>\\remoteserver\Site</publishDir>
<cleanPublishDirPriorToCopy>true</cleanPublishDirPriorToCopy>
<useLabelSubDirectory>false</useLabelSubDirectory>
<description>Build publish</description>
</buildpublisher>
You need to share the \remoteserver\Site directory. Also make sure the user (or service account) that runs the CruisControl.Net service has read/write permissions on the shared directory. We use nant to copy files from Clear Case to another server with this method.

Can html5 be used front end for an ftp server?

quick question to day. I've done a little digging around on the net and i can't really find a very definitive answer.
Basically, I run my own server on a redundant dual core, 4gb ram 2Tb pc (server1)
And on here, i would like to make an FTP partition. Reason being, i would very much like to be able to transfer files back and forth work, uni and home as i please.
I also run a website from my server which allows me to stream media from my hard drive to any laptop, tablet, desktop, iphone, android.. you name it!
I would LIKE to be able to add a section on my website where by I can log in and access my files as a sort of HTMF5 Front end.
I am aware and know how to create a login with a database which has md5 hash and store cookies to stop un-authorised people accessing my ftp.
Any help or a shove in the right direction would be much appreciated! Thanks in advance :D
Yes it's possible. but that won't be HTML5 ftp server etc that you mentioned.
You can achieve this by installing a web server on your machine like apache and then make directories public - run Apache on some port and you will be able to access the directory. if your server is running on port 8080, URL will be like: domain.com:8080 - You can style directory using this simple script & make this password protected as well using .htaccess .
osFileManager
The other option is to use some php script. Many commercial scripts are available and as well as open source. i recommend you trying osFileManager - it has a lot of features like:
Browse the directory structure
Create files
Upload files
Rename files
Move files
Delete files
Edit files
Change permissions
Change password
Create users
Here is it's installation instructions: http://www.osfilemanager.com/osfilemanager-docs.html
or a paid HTML5 & AJAX based script can be bought for 14$ from here:
http://codecanyon.net/item/file-manager-and-backup-system/5177206

How to distribute a web site for review?

I'm not sure if this is a programming question, or would be better served on a sister site.
I want to mock up a web site & distribute it by email to some non-tech people for comment.
I can't ask then to install an Apache server, but wondered if I could bundle the site into an .exe, or a .zip and have them open Index.php and play around with the site.
All users are non-techie; all will use Windows; the site is coded in PHP and all internal references to URLs, CSS< images are by way of $_SERVER['DOCUMENT_ROOT']
Any advice?
Just throw it on a web server hiding behind some authentication.
It'd be hard to ask a non-techie person to get it running seeing that it would need apache or another server that would run the php. If I were you I'd probably set up a site that's password protected, you send the link & password to the people and they have a look.
I recommend using something like XAMPP if you can get them to install it. Unfortunately, your website cannot run locally as is without the proper software.
Alternatively, you can either pay for web-hosting or create a server that you can access via its IP address from another user's machine. Make use of this guide for access control if you wish.