Pointing my domain from godaddy to ec2 Ubuntu wordpress - wordpress

Please how do I point my domain directly to the paajoe directory ? When I enter paajoe.com I see this two directory but I want to go directly to the paajoe directory.

This would require an update to your web server configuration which would differ depending on which web server you are using. Typically, it'll be Apache or NGINX.
If Apache, you need to update the DocumentRoot and Directory values within your configuration file while would typically live in /etc/apache2/sites-available/.
If NGINX, you need to update the root value within your configuration file which would typically live in /etc/nginx/sites-available/.
Here are a couple of links which would help in either situation:
https://www.digitalocean.com/community/tutorials/how-to-move-an-nginx-web-root-to-a-new-location-on-ubuntu-16-04
https://www.digitalocean.com/community/tutorials/how-to-move-an-apache-web-root-to-a-new-location-on-ubuntu-16-04

Related

Host multiple sites in nginx digital ocean

I created digital ocean droplet and host a RESTapi. In the same droplet now I need to host two different vuejs SPAs. I install nginx and I don't know what to next. I gothough some tutorials and they say goto /etc/nginx/conf.d/virtual.conf and edit virtual.conf But there is no such a file there and also some tutorials say goto /etc/nginx/sites-available/default and edit the default file.
What should I do?
Hope you understand my question.
I have always created virtual host site files in /etc/nginx/sites-available/
and then symlinked them to /etc/nginx/sites-enabled/
You can either have only one site file with multiple server blocks or multiple site files with only one server block. I think the latter is best practice.
For a complete guide, visit this tutorial

Getting nginx 404 error on uploaded files

I am using PHP (5.3) to upload jpeg files, create folders for those files and store them. I have a development version and a live version both running on the same server (CentOS 7, Apache, Plesk 12).
On the live version, I am experiencing no problems, but on the dev version, the files are uploading successfully but I am getting nginx 404 errors when trying to access them through the browser.
If I try to access something which doesn't exist, I get a standard 404 error (not an nginx one).
When checking the access_log, I see a 200 code for the files.
Nothing in the error_log nor in the nginx error log.
No differences in PHP code, folder structure or configuration.
I recently changed servers and this is the first time I have attempted this upload on the dev system on this new server. Live version is used daily for this activity.
If I try to access older uploads on the dev server, they all work fine. It is only affecting new uploads.
Permissions and ownership are the same for both live and dev systems and old/new folders/files.
If I manually upload a jpeg to the folder, it also triggers an nginx 404 when accessed.
I have no experience with nginx so I am at a loss as to what I can try to resolve this issue.
It looks like you have upload and access files in one place but checking log in another place.
Are you sure you have no issues with domain name resolving?
Also it can be issue with virtual host - when you access file it overtaken by some other virtual host. It maybe default host for IP address.
I recommend you grep all system and vhost logs for file you have trying to access.

How to access local WordPress installs from other machines on my network

I have XAMPP running fine on one machine and I have 2 WordPress installs running fine on that machine. I would like to be able to access and work on those WordPress installs on other machines on my network.
Right now, I have it set so that if I try to access those directories from another computer on the network, all I get is either the XAMPP splash screen, or a 404 error if I try to access specific folders.
I've researched this and researched this and I have found numerous posts about how to do this.... but only in bits and pieces.
Does anyone know of a step by step, start to finish, guide of how to do this? In layman's terms?
Remote (from another network) would be great too. But I'll cross that bridge once I figure this out.
Any help would be appreciated.
Thanks!
I would suggest rather than shared folders you use an FTP client / server - I use Filezilla server and client for my local sandbox testing server. This will give you additional info like file and folder groups and permissions.
Got to ask the question what OS? have you opened port 80 on the server machine?
Things like this can also occur on Linux if the folders and files do not have the correct groups for access and or permissions.
chown -R apache:apache /var/www/html
the above if on linux will assign all the folders and files to be accessed by the apache process. not having the correct groups assigned can give you 404 when you know the files are actually there.
also check the file and folder permissions,
different files and directories have permissions that specify who and what can read, write, modify and access them - this wordpress page gives a good overview of permissions
http://codex.wordpress.org/Changing_File_Permissions
edit p.s. to access then from other networks all you will have to do is forward ports from your router to your internal server then your ftp and www services will be accessable from the outside world. I would suggest using a .htpass htaccess password to protect your services at this point.

Wordpress wp-content Permissions settings behaviour on different servers

I built a WP site on a particular server. I did not set or change any folder permissions and everything worked perfectly. Mainly, I could upload files and images.
I then moved the install to a different server and domain. Suddenly I could not upload to the media library.
On checking the permissions of the wp-content folder and its sub-folders the permissions were set to 755. I only assume this is what they were set to on the previous server.
By setting them to 777 I could then upload files but understand this is a big security risk. I then set it back to 755 and cannot upload again.
Can anyone explain why 755 is ok on one server but not on another please? and what I could do on the new server to make 755 acceptable?
The file permissions are correct 755, you'll have to check the file owner also.
Do not assume the file permision and owner on the development server will be correct on other servers (different os's can give issues as the one you have, different webservers from different os's can give again issues as above).
It also depends on the way you upload your files:
-you can do it throw ftp then you'll have to check the ftp settings (how it saves the files, under which user).
-if you use ssh to upload then it depends on the user that you used to connect to the server
and so on... (I saw the ftp tag but wanted to describe this also )
At this point you'll have to make sure that the website files have as owner the webserver (different server setups require different websrevers - www-data vs apache vs ... )
In the end it depends on the control (options you can change) on the server, do you have ssh access? Do you have to contact your host for this corrections?
If you are not administrating this new domain server then contact it's administrator it is a setting issue(of the ftp ) or a bug/error that he should handle.

Symfony2 Environment Configuration

I have a Symfony2 application with JS+PHP files that should access
"http://localhost/blahblah"
when on my development machine, but
"http://mydomain.com/blahblah"
when I push them to the production server. What's the appropriate way to configure these domains in Symfony2, to avoid manually changing the files with each server push?
I think the better is create a virtual host in your local machine and add these hosts mydomain.com/blahblah www.mydomain.com
In your host file, in linux are in /etc/hosts windows system32\drivers\etc\hosts ( i guess )
When you want to see production site you can comment those lines in your host file

Resources