Create server panel like cPanel - service

I have a VPS, Cent OS 6.4 64bit
I want to create a panel (like cPanel) and I want to make it accessible by opening a port (serverip:2082 for example). I have created php files of my own panel but i don't know anything about linux services.
What type of code must I make and where can I put it?
Thank you in advance!

no offense, but if you really don't know about linux service you are 99% away from creating your own panel. You first need to understnad that Cpanel not only modify system files to allow hosting and managing database, but it also do all these without playing with system security.
But to start you need a web server that will host your Cpanel. I prefer it to be different from your webserver that host your website, reason? What if your default apache is inaccessible or crash, your panel will crash with it. Then you need to learn Mysql, or database you want to manage through panel, DNS binding, Name servers, regular expression to manage text files of configuration etc.
I know all these because I already built a Cpanel like application, and know it is not easy job especially with this level of question you asked.

Related

How to get started with vSphere 6.0 and set up the web client?

Linked from here
I've been tasked with setting up some VMs. I've been given some admin details but no further guidance. The server is a fresh install.
My problem is that I'm on Linux/OSX and don't want to run Windows aside from setting up after which I hope to be able to manage things through the web client.
I think there is an ESXi installation. This would be Version 6. How do I set up the web client?
I've installed vSphere Client on a local Windows VM.. not sure what to do with it though.
The documentation is pretty awful and there hasn't been much useful info on the net. I'm really stuck as I didn't set these up and haven't used servers like this before, so I have no context or understanding of the VMWare ecosystem beyond using a virtual machine locally! (even then I've preferred Virtualbox)
Any advice would be amazing
p.s accessing https://[ipaddress]/vsphere-client does not work. Produces a blank browser page... with no html served as an error
If you have the name of the server on which the VMs are stored, type this into the URL of a web browser then it gives you management options or alternatively use this login screen:

A good development workflow for static sites with one or two PHP files?

so I'm still learning a lot about best practices and local development workflows when working on my web projects. At the moment, when I develop a static site locally I tend to use Grunt + Bower + some static site generator to start up a local server really quickly. On the other hand when I'm working on a more PHP focused project I will set up a Vagrant box, depending on the focus. My question though is what is the best way to locally develop static sites that have one or two PHP files within them, such as a handler for a contact form? I can't run the PHP on my local server under grunt (at least as my current workflow stands — I use the browsersync plugin — is there a way to do this?), but using Vagrant seems like overkill, especially sometimes when I've settled into using a static site generator, and later realise I need to write a server side script.
You can use nginx to reverse proxy requests to your localhost (your machine). This would route *.php to other IP (a vagrant machine just for those two PHP that happened later) and all other static request to you local grunt server.
With this setup your development site would ever be in http://localhost/ or http://localhost:xxxx where xxx is some port. But, depending on the target requested (php, jpg, html, etc) the request will be routed to right place.

ColdFusion Builder 3 vs. Dreamweaver & local and remote paths

I can't wrap my head around how I'm supposed to use ColdFusion Builder 3 (akin to Eclipse).
Up until this point, I've been using Dreamweaver 5, which is getting 'long-in-the-tooth', and I wanted to give CF Builder a try.
So, in Dreamweaver, it's pretty simple: you setup connections to servers using credentials... There's a Local path, which is the local copy of your code, and the webroot of the Server which is the 'live' copy of your code. Basically, you make a change to the local copy, and PUT the change to the Server. Easy peasy lemon squeezy, right?
But, how does this translate to ColdFusion Builder 3?
Just to give you an idea of our infrastructure.... we have Development and Production. Each of these boxes has multiple web instances, example: Accounting, Human Resources, IT. Each of those web instances could have multiple applications.... I'm only considered about my instance, IT, on both the Production and Development servers.
Is a workspace supposed to represent an instance on a web server?
In CFBuilder, should I configure 1 server per web app?
Is a project supposed to represent a web app?
Am I supposed to use drive mappings to the inetpub wwwroot for access to web applications? Is it even considered kosher to have a drive mapping to the web root? \server\c$\inetpub\wwwroot
Where do I keep my local copy of my code?
How do I move items from Development to Production?
My main confusion is with workspaces, projects, and servers... My intent is to debug and 'view page in browser' from CFBuilder.... However, when you setup a server, under Server Mapping and URL Prefix, you're supposed to indicate the Local and Remote paths, plus this is not directly related to the physical location of the project.... and as I've mentioned, there's multiple instances, multiple applications, and the development box is not my local machine, it's a remote server...
I would really like to know how others have made this work for them.
I really don't mind this question even though it's not directly code related because I've been using ColdFusion Builder (CFB) for years and there just isn't enough good documentation out there. I now enjoy a great experience with CFB thanks to blog posts and sharing experiences with other devs :)
My setup: CFB3 running on Windows 8.1, dev server running on a Virtual Machine so it is treated as "remote server" just like yours. I also update remote staging and production servers (although not directly from CFB).
First, let's set some reasonable expectations: Dreamweaver and CFB are very different in that CFB focuses on programming and Dreamweaver on design. CFB is built on eclipse and therefore has the advantage of benefiting from most eclipse plugins.
Your question is specifically about how to set up your projects in CFB using 2 remote servers (dev and prod). It's different for everyone but I'll share my setup with you. (sidenote: My projects are also stored in Git repositories - 1 repo for every app)
Starting from the top: A workspace in CFB deals with your whole eclipse application, not just your projects. The most important things kept in this directory are snippets and plugins. You do NOT need to keep your project files in here. This is merely the main directory where all of your settings are kept. You are not required to have more than 1 workspace (I only have one). Why would you need more than one? You may be multifaceted programmer who needs to keep separate workspaces using separate tools (like different plugins, snippets, window layouts...)
To answer your next question (1 server per web app), all you need to to is configure your dev servers in the "CF Servers" tab. You need to add 1 server per web instance for every instance that you'd like to test on. Hopefully, your dev server has RDS enabled (very helpful for remote database and file viewing, just like in Dreamweaver). During configuration, don't worry about Mappings or Virtual Host Settings (I have another recommendation later). Once configured, you'll be able to assign that server to a project.
Drive mappings: I would never recommend mapping to the webroot of a shared dev server. If you were to use that drive map as your local directory, your changes will be made directly to the development server. What you want to do is create a new project by right clicking in the Navigator area and select Import > Other > FTP. Follow the steps, choose anywhere on your local drive to store the files, then choose "New project" at the end (this will add the .project file necessary for CFB to control the project).
Once the project is created, right click on it, select ColdFusion Project and choose the CFML Dictionary version you'll be using (CF11, 10, 9...). Then, select ColdFusion Server Settings and choose the dev server. This is necessary for testing.
What you now have is a local directory with your app and eclipse knows about the remote server. In order to synchronize, you right click on the project, go to Team and synchronize from there. For detailed information about synchronization over FTP, see the help section "Guide to WebDAV and FTP".
Moving to production is not as simple as it was in Dreamweaver. The FTP configuration information only allows for 1 connection (thus giving you a list of files synchronized between your project and the dev server). Therefore, you'll need a third party FTP client to synchronize between your local project and your prod server.
As promised, my last entry will be able the "debugging" which is why I said to skip the mappings and virtual host settings in CF Server config. I really, really recommend using a third party paid plugin called FusionDebug (http://www.fusion-debug.com/). This plugin facilitates the setup and allows you to step-into all of your code (which doesn't work so well in native CFB). There's a 30 day trial and I recommend you try before your buy (or license for a year in this case!)

Is it a good idea to use WAMP server as a web server?

I have bought a VDS (Virtual Dedicated Server) that Windows Server 2008 is installed on it. I needed to use server because I have developed a C# console application that can read data by TCP socket and write them in the MySQL database.
Now I need to start a website on this server. I think WAMP server is so easy for me.
Maybe in future a lot of people visit my website.
Is it a good idea to use WAMP server as a web server?
In principal there is nothing wrong with using WAMPServer as a LIVE webserver.
However, not the out of the box version.
Out of the box WAMPServer and XAMPP for that matter expect to be used as a single seat developer tool and while that is great for a click and go solution to get a developer up and running on Apache/MySQL and PHP in a few minutes it is not secure enough to be considered as a LIVE web facing webserver.
Now if you have the knowledge and experience to create an user account on Windows Server that has access to only what Apache needs to do its work, and can get Apache to run in that account instead of its default account (which has way to many privilages for a live server) and are prepared to explore all the Apache security features/modules that would be required for a web facing server then it is possible. However this is not a trivial task, and any mistakes or ommissions will leave your server open to the simplest of hacks.
In short, unless you really know what you are doing with Windows Server and Apache, you would be far better to pay for a professionally configured and managed web server environment.

How to deploy a project developed in Tapestry5?

I have just completed a project as part of a college degree.
However I would like to deploy the project and make it live.
I am unsure of how to do this as I have never done it before?
I know I need to buy a domain name and some server space to host the project.
If anyone can point me in the right direction that would be great?
Thanks in advance!
There are a few inexpensive hosting options such as Slicehost or Linode that will let you run Tomcat, Jetty, or whatever servlet container you choose. You may be able to find an even cheaper solution by looking for hosting providers that run Tomcat but you won't have as much control. So, for example, you could get the cheapest Slicehost account which gives you full access to your own server. Install Tomcat, a database if necessary, and deploy your war. At that point you'll be running with an IP address. Register a domain name and point the name servers to the Slicehost name servers and you'll be 'live'. You may want to run Apache in front of Tomcat and you should probably learn about securing your server (Shorewall is one option), but this should get you started.