How to make subdomain from ip using a php form - ip

I want to have a form on my website so users can make a subdomain for their game server so like if the ip for the server is
192.168.1.132 then they put it into a form and they make a name for the subdomain
and then they can use this to join their server name.domain.com:76651

I'm Mitch from Shockbyte - and the creator of the subdomain creation tool you linked to.
The subdomain creation tool on Shockbyte uses an API that can be purchased at: https://shockbyte.com/billing/cart.php?a=add&pid=34
This includes the PHP files to add the subdomain creator to your own website. This is the system that Shockbyte uses, as well as pretty much every host that has a subdomain creator tool on their website.
If you wish to create your own tool with PHP instead of using the system above, you will need more than just a PHP script.
You will need to be running a DNS server to create the records on. The most popular is probably BIND.
Once you have a DNS server running, then you can write a PHP script to manipulate the records. It will depend on which DNS server you use, but there may be an API available or if you're using a database such as MySQL, then you may be able to directly query the database.

Related

NGINX set-up server-block on existing domain names/sites

Good day!
Due intense desire to learn new things, I have tried setting up my very own new server which is in Linux and a hosting using Centos Web Panel at home. After the installation process, I then proceeded with the common installation of the necessary configurations including the WebServer. I chose NGINX because I've read that it is lighter and more scalable than Apache, and can be used as a web server or as a reverse proxy. After that I then proceeded with the creation of my new website with the domain I have. After creating my website, it was only then that I have read about Server Blocks in NGINX (Site I read).
My question is how can I implement the Server Block method to my existing website? Or should I simply remove my site and create a new one using the server block method?
Thanks in advance
UPDATE
I created my website by creating an account in User Accounts category on CWP where I declared my domain name and ip address. Then I was given prompted to User Account dashboard(IP:2082).
Uploading of files is through FTP using my ip/username/password/port which is usually located on /home/user_account/public_html. But after seeing the tutorials, everything is set to to /var/www/domain/public_html

is it possible to create a wordpress site in aws ec2 using load balancing and auto scaling

I created a WordPress site in AWS EC2. it works fine and I can login to my dashboard, then I created a load balancer. I changed my SiteUrl in wp_options to my loadbalancer's dns.
I created an image of that instance. Now I created an auto-scaling group with that image. I'm able to visit my site using the load balancer dns , but I can't login into my dashboard using dns. when I type dns/site/wp-admin it says:
wp-login.php was not Found on this server.
I don't what is the problem. kindly help me.
Edit: To why this is not working because considering you made an image of instance , that means it has two databases (assuming you have not used RDS) now and two servers with two different set of files and db. This should not be the case and might be that would be reason it is not working.
You are taking the wrong approach , you can take advantage of Auto Scaling and Load Balancing if you have designed your site in that way.
This might be a long answer but I hope it clears your understating of how it works or how ideally it should work on AWS
Stateless server
A stateless server is the pre-requisite for building a highly available and scalable infrastructure on AWS. A stateless server does not store any data expect of temporary data like caches.
By default WordPress is storing data in two different ways:
MySQL database: articles, comments, users and parts of the
configuration are stored in a MySQL database.
File system: media files uploaded by the authors are stored on the
file system.
If the MySQL database is running on the same EC2 instance as the
WordPress application itself, the server is not stateless. Same is
true for the media files stored on the file system.
Why is this a problem? Because if the virtual machine becomes unavailable, the data will be unavailable, too. And if you need to add another EC2 instance to handle more traffic all the data will be missing on the additional server
Components that you need to use are :
RDS: managed MySQL database
S3: media file storage
ELB: synchronous decoupling
Auto Scaling based on usage
You can refer to this sample architecture for reference:
You can Refer this Blog Post or can use this CloudFormation Template too.

Local Drupal website connecting to a remote database

I'm new to Drupal. I want to run my Drupal website locally and connect directly to the remote database, but I can't seem to figure out how to do it. I have MAMP installed on the Mac and I have all the files in the htdocs folder. It looks like I just need to change the settings.php file to match my remote database, but I'm unsure what I need to change.
I guest you look at this drupal.org HowTo that step by step guides you through creating the database and what you need to change before running the Install program.
https://www.drupal.org/node/66187
Also check the comments on that thread.
Yes, you have to adjust your settings file (/sites/default.settings.php), database configuration. Watch out, usually there is a different ("external") host for accessing database from out of server. I think that it can be set per database user does it has privileges to access database from outer server or not. Maybe there's some special user for that.
There should not be any extra setup or configuration. Just make sure that
You are connected to the remote database (usually goes in sites/default/settings.php).
The database host allows remote connections.

Setting up asp.net test server

I am creating a website in asp.net MVC 4 and am wondering the best way to set up a test server?
I am doing this from home and would like a way for my friend to test my code from a different location (his home). What would the best way to go about this? Build a local server that he only has access to? VMWare? Online web hosting?
One solution would be to use a VM and set up a server.
NOTE! that this would require your friend to redirect your IP Adress to the host name you will set for your website on the IIS of your VM.
He can easily do that by changing his Hosts at C:\Windows\System32\drivers\etc
Another option would be actually to purchase a domain (that you will need anyway eventually)
The purchase a hosting package (that you will also need anyway eventually).
Then setup your website on a sub domain in that hosting server e.g. dev.myDomain.com

Best way to create a sandbox area on my asp .net host

I would like to create a sandbox area on my hosting provider that only the client can see. For example the production website would be at www.domain.com. However, would it be possible to create a sandbox version of the website at www.domain.com/sandbox and only provide access to the client?
If so, what is the best method? Do I manually have to create a login page etc in the sandbox folder? Or, can I publish the test website in the sandbox area and restrict access through my hosting provider?
Generally a sandbox/staging/test version of your production site would be a complete duplicate of your production deployment, not just the login page.
You'd have a separate copy of the application and the database, and then serve it via another hostname/IP address or on an entirely different machine.
For instance, you could have www.domain.com and test.domain.com, each with the own isolated version of the software. This way your client can play as much as they want in the sandbox without fear of damaging the production environment.
To restrict access you could use access control lists in IIS to restrict the sandbox to a specific ip address (or range), or enable basic support on it with a username/password required security.

Resources