Virtual Host location on cPanel Server - cpanel

As the title says. whats the path to the virtual hosts on a cpanel server?
I need to add a virtual host and have a couple of paths and would like to know where it is meant to be rather than where will work.

I have usr/local/apache/conf/extra/httpd-vhosts.conf.

I had the same problem. But after some searching i found another solution.
The solution is using ssh. I used PuTTY (you can download it here https://www.putty.org/).
Once you install and open PuTTY : in the "Host Name(or IP address)" form write the name of your website (or the ip of the server if you don't have a domain yet).
Once you are in it will ask you for a login and then a password.
The login and the password are the same as for the cpanel.
SSH might not be available, it depends on cpanel.
So you might need to contact the support to enable it.

Related

Wrong hostname in cPanel notification emails

In our dedicated server even we run "/usr/local/cpanel/bin/set_hostname" from SSH as ROOT all notifications from the server has wrong hostname URL. The problem remains only in notification mails and sometimes HTTPS URLs (but this one is cause of local DNS records i guess).
We already did:
Changed hostname from WHM
Changed RDNS records
Fixed etc/hosts
Run /usr/local/cpanel/bin/set_hostname [hostname]
Fixed WHM api1
Reboot :)
Read StackOverflow
So can anyone offer a solution for this issue?
Editing wrong hostname values in one of the files Apache uses to build it's main configuration file "/var/cpanel/conf/apache/main" have solved the issue.
This solution had come from cPanel Customer Support. Hope it helps.
in my case I edit "/etc/hosts" and remove old host name attached to server ip.

Can't access my website after trying to move it to another server

I want to move my website to my new virtual server that I bought from another service provider.
I installed Apache Webserver, created a virtuzal host for the website and I changed the DNS in my actual service provider's admin panel pointing to the new server's IP address.
I then realized that I can't access mysql to export my database and I disabled the domain on the new server, changed the DNS back in my old admin, but now I get a ERR_CONNECTION_REFUSED when I try to call the website.
I don't find anything on Google, because everybody wants me to delete browser cookies (which I did), but that doesn't help.
What can I do for getting back the old website and being able to export my MySQL database?
It may well be that your DNS records are still propagating and you need to wait. Try adding an entry in your hosts file to point to the "old" site URL and hit it in your browser. If it works then it's the DNS not completed propagating. Otherwise your error looks like an Apache issue not a MySQL issue.
I simply deleted the virtual host on the new server for the domain and I was able to access the "old" site immediately.
It's still possible, that the DNS just finished propagating, like #George said, but it's very unlikely.

Bitnami Trac apache set domain name

I recently installed Bitnami trac and now I want to access it using my domain name.
I've made the necessary changes to the apache config file (httpd.conf) found in C:\Bitnami\trac-1.0.5-0\apache2\conf\ directory. I've installed trac in port 8080.
So this is the only change I made.
ServerName trac.mydomain.com:8080
I had trac in another server before, and that time also this was the only change I made to get my domain work with it. But this time it doesn't work.
Can somebody please tell me where I've missed? Do I have to update any other place?
According to your comment, you can access the server fine by using the IP address, but can't access it at all when using the domain name. This sounds like it might not be related to Trac at all. Here are a couple of things to try:
Run "nslookup your-domain-name.com". You should get a result that says "Addresses:" and lists your server's IP address. If you don't (or if you get a "Non-existent domain" error), then your DNS server isn't mapping your domain name to your IP address correctly.
Look through Apache's various log files on your server and see if there is any evidence of your request ever reaching your server. Whenever I do this, I first change LogLevel to debug in the Apache config files so that I get as much output as possible (restart Apache after changing the config file). If a 'debug'-level log doesn't even show that Apache saw the request, then something between your server and your local system is causing problems (a firewall perhaps). If the Apache logs do show that the request made it through, then the problem is likely an Apache configuration problem and the log output should provide hints as to how to continue.
Try connecting via VPN and then accessing your server by domain name (not IP address). If you can access the server by IP but not by name, then the server may not know its own domain name.
Bitnami developer here. By default bitnami installations accept petitions from any IP so you don't have to set the ServerName.
Although, if you want your page to be accessible using trac.yourdomain.com, you should consider using apache virtualHosts, could you try to follow this documentation page?
https://wiki.bitnami.com/Components/Apache#How_to_create_a_Virtual_Host.3f

Setup cPanel on CentOS, website not working

I've setup a cPanel server on CentOS. Followed through with all the basic recommended installation options.
I've created an account - mydomain.com.au - and have been able to access the cpanel for that account through WHM.
My server's public IP is 1.2.3.4, I've created an A record in my domain register for www.mydomain.com.au -> 1.2.3.4. This does resolve correctly when checked through ping and mxtoolbox.
However, when I try to access the site www.mydomain.com.au, I get taken to "This web page is not available".
Am I missing something? I haven't setup the cPanel server with DNS hosting/private nameserver as I'm trying to get something basic going first, just a simple hosting account.
I think you have not updated the correct "A" record of your site and due to that you are getting this issues, Please update it correctly and check your domain DNS report at : http://intodns.com/
Check that account's VirtualHost in httpd.conf, maybe it has a wrong IP.
Point the IP address correctly to resolve the issue, if you have DNS clustering enabled and you have WHM access then you can edit it accordingly in WHM or you can contact your support that manages the nameserver's for the domain and ask them to point it.

apache mod_rewritemap virtual host file

Hi I am very new to all these. my website need rewrite url. I joined godaddy linux based.
i want to use the rewrite map function. and trying to write the syntex for this purpose
However i just found that the code has to be put in virtual host file in apache configuration, and rewriteMap only works if you have access in httpd.conf and virtual host.
i have no idea on these. where can i find the 'virtual host file', and the httpd.conf?
can someone give clear procedure for me
thanks
With Go Daddy shared hosting you will not have access to the virtual host configuration.
If you're using Godaddy, it is unlikely you'll have access to any of these things. You can either contact Godaddy's customer support, or follow my work-around in the last question that you asked about RewriteMap.