Android Chrome connects to wrong directory when using VPS server - wordpress

I know that this can be silly question with a simple answer but I am new with hosting a VPS server and learning things, so forgive my ignorance. My problem is that I have set up a VPS server and I am hosting my own WordPress site and everything else seems to go smooth but when I am trying to see my webpage using phone it will show var/www/ directory instead of home/mydomain/public_html content like with windows any browser. I have checked my apache2 .conf file and the directories there seems to be right. Can't find anything similar by googling so do you have any ideas how to start to tackle this issue?

Related

Why is the www version of website not working properly?

I'm facing a problem with the following website: https://www.rhythmandstrums.ie/
When I open the "www" version of it: https://www.rhythmandstrums.ie/ I get a bugged website, failing to open stylesheets and possibly other file sources, whereas if I open the website without the "www", everything works as expected: https://rhythmandstrums.ie/
Some considerations:
This website is hosted in a Wordpress Multisite, so it shares the same configuration files as other websites, none of the other websites have this issue. So I was wondering if this could be a problem with redirection, although, again, none of the other websites have this problem and they share the same config files (including server block settings and such, it is in nginx).
I have checked the DNS values and nameservers and everything looks fine (I took base from all the other websites that were set up in the same way, I can post a screenshot if it might be of help).
This error also seems to happen in the Wordpress backend, with the admin dashboard not being able to load parts of plugins, it seems like it is looking where it doesn't exist.
I have replaced instances of the www version of the url in the database, as I do with other websites as well, but that didn't seem to fix the issue.
I have cleared cache a few times (both in the cache plugin and manually in the nginx server - manually deleting the contents of the cache folder), and since this has been going for a long time, I don't know if this is cache related, but any suggestion is highly appreciated. Again, all the configs, included the cache plugin settings are the same for all the other websites in the network, which none are having this issue.
If I inspect the console when I'm accessing both versions of the website, www and non-www it seems like it's trying to pull information from different locations, but I can't figure out why it's doing that.
Guys, I hope this was not confusing, but let me know if you you would like to see screenshots or other info that might be relevant. Thanks so much in advance, I really appreciate it.

Speed of Localhost Server

I have built my wordpress/woocommerce and hosted it on Localhost via WAMP.
Since day one, before I had loaded any plugins etc and only had the wordpress CMS installed, it has ran very, very slow.
I have been advised that it should be no where near as slow as it is and could be a variety of reasons for this such as bad coding.
I am very new to web design etc and was wondering if someone would be able to advise as to how to check what might be slowing things down?
I have installed jquery monitor and it shows a few different things but all are plugins which are relatively new and the problem has been there since day one...
I have been looking for a free host to try on but my website exceeds the size as it is at 1.6gb which people have said could be the problem, however the problem as I have mentioned has been there since day one with only the basic CMS shell and no uploads.
My comuter is also relatively fast and I have no issues with how it runs i general.
Any help would be much appreciated.
Do you use http://localhost for accessing the website and "localhost" as MySQL host? If yes, try accessing the website through http://127.0.0.1 and 127.0.0.1 in your wp-config.php for your MySQL host. Depending upon your Windows version and network settings it is possible that your DNS resolution fails.
Do you have Antivirus solutions enabled? Try to disable them temporarily and check if the problem still exists.
Check with tools like Wireshark and procmon which of the components (webserver, network, client) take how long for processing the HTTP requests.
If all directories hosted on your local server are slow then this means your WAMP is the one causing the issue.
Try backing up everything and resolve this by following this instructions here
https://www.devside.net/wamp-server/wamp-is-running-very-slow
This worked for me.

CENTOS 7 nginx issue

I am not a developer, but just know how to work with google, which means i lack a lot of knowledge. I work for an NGO here, and we have received free hosting to build the site on. I can build sites (wordpress) but have always worked through hosting like godaddy. Now we have cloud through a company called BMIT, and i am struggling to install
https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-on-centos-7
So far everything worked, created a different root etc, but when installing nginx this works, but when running
sudo systemctl start nginx I get an error and this is
Can anyone point me in the right direction?
inspect the log file located on /var/log/nginx/, there you can find error log file and reason

Trying To Access A Wordpress Site Over The Internet

I have a wordpress site on the Ubuntu computer that I am using as a webserver. I have the wordpress system installed in /var/www/html. I have created pages which display nicely from any computer, tablet or handheld within my lan environment.
I am going crazy trying to access my website from the internet. Can anybody please help?
I have a noip address and a BTHub which allows me to set up dynamic dns to inform my noip account automatically when the ip changes and this works fine.
I have set up port forwarding for http and https to the computer hosting my wordpress site
I have tried assigning DMZ to my wordpress hosting computer
I have made sure I own the wordpress folders and files within them
my LAMP installed without a hitch and over the LAN access is no problem with one exception - I can only use the default permalinks or wordpress can not find my pages - no idea why? I had to cut wordpress into var/www/html as it initially went into www and could not be found
I have spent DAYS with this! It is a part of a bigger project where I want to run some projects across the internet. I dispair that if I cant get a simple wordpress site to work that my projects are doomed! lol.
When I try to access my site from another location across the internet, I get the first page, but without the media picture that should be on it. When I try to change pages I get the not found message. I also get the initial page without a style sheet in some instances. I have no clue about how to fix this. I took up Linux about three months ago, having been a windows and OSx man for years. I am in love, but have a steep learning curve!
It looks like a location issue or a WAN address issue or something I cant figure out!
I would appreciate any help that anyone out there can give me.
Eric
Thank you for your feedback. I have just this moment sorted it out. I read up the permalinks wiki thoroughly and I found out how to change the URLs from within the wp- files in the theme I was using. After a few refreshes it now works. I will post up a how-to for any others who may be experiencing the same frustration.

Wordpress API works with VPN only?

I'm working on a project on my localhost for sometime now, and i've recently tried to make it online. My project works perfectly on my localhost, and I can post new articles to wordpress blogs with no problem.
The problem is, after uploading my project to a online web server ( Hostgators Baby Plan ) , I tried to add a new post to one of my wordpress blogs and I got the following error :
faultCode 500 faultString You are not allowed to do that.
The thing is, I've searched everywhere in the past few days in-order to solve this problem and had no luck.
Do you guys think this problem is caused because i'm using a webserver and not a VPS? If you have any other solutions I'll be glad to hear them out.
It might be related to file permissions or something like that.
There is no need to use VPS. I manage my website on a shared server and I've tested WordPress on free hosting services too.
This is probably due to incorrect permissions either on the file structure or the mySQL DB user or something like that. Take a look at this article on the WP codex about file permissions.
Big services like Hostgater usually have an "auto-install" feature for common software like Wordpress (via Softaculous or something similar). I don't know how you migrated your site from your local version to the server but it may be worth installing a fresh Wordpress instance through Hostgator and then simply loading in the wp-content folder and your development database on top of that.

Resources