How to point a domain to a laravel installation folder on shared hosting - apache

I've installed Laravel 5.3 on shared hosting inside public_html/NitsEditor folder though SSH Terminal, the core domain of the hosting is something different i.e. "noeticitservices.com" and it has wordpress installed in it, so the laravel home page appears into noeticitservices.com/NitsEditor/public/
I've a domain named "nitseditor.com" I want to have public/index.php under this domain name.
I've configured the DNS of the domain to the IP address of my shared hosting and also added the domain through cpanel, while doing this I can see there is a folder named public_html/nitseditor.com is created.
Please guide me how can I achieve this.

While creating domain through cpanel set path public_html/NitsEditor/public/

Related

Can I direct a cpanel folder to a domain name hosted with a different registrar?

I'm wondering if this is possible and I'm not sure that it is. Before I explain, I found one other post [here]: Separate Domain Registrar and Host, possible to use CDN? which sounds similar to my problem, but I specifically don't want to point the Name Servers away. I only mention this because my question is going to sound very similar.
So I'm trying to help a friend who has a Domain Name registered on Site A (let's assume it's a place like Wix). He also has a hosting package on Site B (to have cpanel access for a site he had built with HTML & PHP).
for example:
1. www.yourdomain.com is hosted on Wix with a template website
2. "database" is a cpanel folder on Site B
Is there a way to have www.yourdomain.com/database link to the "database" folder on Site B's hosting -- without changing the Name Servers?
I don’t believe you can point a directory to a completely different server or hosting package.
However creating a sub domain instead could be your answer.
Is there anything stopping you from using database.yourdomain.com and creating an A record for this in your domain registrar and point it to the hosting package of database?

Swap primary domains on GoDaddy cpanel hosting

I have two domains hosted on GoDaddy cpanel - one is the primary and the other is an Addon. Each of the two domains has a live website hosted on it (both sites developed on Wordpress). Basically I just need to swap the Addon domain to become the primary domain. What's the best way of doing this?
I have researched and there are different approaches I gathered.
1- First approach is, to swap the primary domain website files (on File Manager) to be in a sub-folder under public_html. While the Addon domain website files to be placed directly under the root of the Public_HTML folder. Also to go into the Addon Domains option in cpanel, and do something about adding the "connect" to the Addon. I didn't understand what this meant. I can see my Addon domain is in the Addon Domains list. But not sure what else I need to do there?
2- Or I saw another way is, to create subfolders for each website and specify in the .htaccess (in the public_html) the folder which you want to be the main domain (after copying some template script of .htaccess and modyfying the main domain part of the script to be your domain). Then login to the Wordpress admin and in Setting ensure the wordpress address (url) and site address (url) are pointing to the correct sub folder under the domain hosted. Apparently the purpose of this approach is not to place an entire website folders and files directly under the root of public_html, which is very messy. But to keep each website organised in its own sub folder.
So which approach is more recommended? I.e. which is the least messy?
My last question is, I already have the main domain website folders and files directly under the root of the public_html. I don't know which folders and files belong to the website, that I need to move to a subfolder. Under the public_html, I have the following folders (exclusing subfolder of other websites, which obviously belongs to the other websites). I don't which of these folder are part of the main website (to move into a sub folder) and which folders are meant to stay under the public_html:
.htpasswds
.well-known
cgi-bin
hilositelock
oldwp-content
replica
test
wp-admin
wp-content
wp-includes
wpps-tools
Please refer to the info below about the hosting info (in case it's required):
Hosting Package: Ultimate
cPanel Version: 78.0 (build 27)
Apache Version: 2.4.39
PHP Version: 5.6.40
Operating System: linux
Many thanks
Here is the solution to your question.
If you want to swap both site's data (add-on and primary domain) then first take the backup(files and databases) of both websites using some plugin (As you are using WordPress).
Then set add-on domain as primary domain.
Now primary domain will become parked domain and add this parked domain as add-on domain and install a fresh WordPress on it.
Now you can simply restore backup of both sites using the plugin you had used for backup.
For Reference you can relate to this video.

Different virtual hosts for same website but different pages

My web server directory is as follows:
var/www/html/site-part-1
var/www/html/site-part-2
In site-part-1, I have a wordpress installation, and when a person lands on my site by google organic / direct whatever when they type in the domain into addres bar it will take user to site-part-1
Currently site-part-1 is operational with the virtual host configuration directory root directory set to var/www/html/site-part-1
But I have a completely different system in site-part-2, that is built with python which I will be accessing via a link from the wordpress site.
example.com (site-part-1) will have a link, and it will take the user to my website example.com/my/directory and in /my/directory will be the contents of site-part-2
It may have worked sticking site-part-2 in the wordpress site folder but for cleanliness I put it into seperate folder
Does anyone know how I should go about setting up my apache settings so that both directories work together?

Apigility API path is not correct when installed with XAMPP

I've installed Apigility on my CENTOS box which has XAMPP installed to handle my web services. After successfully installing Apigility I can access the admin ui by going to http://00.111.222.33/apigility/public/, which is fine for the ui panel, but when I create an RPC api my path is http://00.111.222.33/apigility/public/ping which is not desirable. I'd like the path to be http://00.111.222.33/ping like how the Apigility tutorials show as an example.
My first thought is to configure the .htaccess rules, but not sure if that's what I should do.
Is installing Apigility in the htdocs the correct place?
Does Apigility have a place to configure the "pretty url"?
Not sure if the port has anything to do with things, but my CENTOS is configured to listen to port 5757.
You should make public the root folder of your webpage.
To do this,
You should go into your apache vhost file.
Here you can change the folder to include /apigility/public.
This way, the apigility ui is on / and the services you create are on /ping /....
The port does not matter.
A related question to this is: How to change xampp localhost to another folder ( outside xampp folder)?

How to let's everyone point there domain to my folder on debian/ apache2?

Let's me give you an example: Blogger.com.
You can create a CNAME in domain DNS to point it to ghs.google.com. After config in blogger's cpanel. Your domain is good to go. You can go to blog.mydomain.com and it will point you direct to your blog.
I'm have a debian/apache2 VPS.And domain tienganhratde.com. I want everyone can point there CNAME to service.tienganhratde.com and they'll see the content of a folder on my VPS. How can I do that?
I solved the problem.
Point your default apache/nginx to your app folder
Use Server uri to know which domain are connecting to your website.
Check within your database and show to suitable page