In AWS amazon, How can I keep my files updated in route53 to my bucket in S3? - html

I have a basic account in AWS amazon to host my personal site.
But I am always confusing, with the versions.
My domain name is www.ladimela.com.
After I upload something to my bucket, everything works fine, for example:
If I upload a html file, to my bucket,
I can see it though my domain without problem.
But if I update it, or even delete it, my domain won't change.
It seems that only create new files will update my domain.
to show you examples, I uploaded a html file named questionforstackoverflow.html, with very simple content:
Hello, this is the old version
then I delete it, and uploaded a new html file to replace it, with the same name, and very simple content as well:
This is the new version
Now, my domain is still the old version, which doesn't exist in my S3 bucket.
here is it:
www.ladimela.com/questionforstackoverflow.html
But I can view my new version with https://s3.amazonaws.com/...
here is it:
s3.amazonaws.com/ladimela/questionforstackoverflow.html
This is my first question in Stackoverflow, I hope someone can help me, thanks!

Both the urls give html which says, new version.
Try clearing the browser cache before reloading the hosted site.

Related

how can I show the s3 files to download with index.html [duplicate]

I have set up an S3 bucket to host static files.
When using the website endpoint (http://.s3-website-us-east-1.amazonaws.com/): it forces me to set an index file. When the file isn't found, it throws an error instead of listing directory contents.
When using the s3 endpoint (.s3.amazonaws.com): I get an XML listing of the files, but I need an HTML listing that users can click the link to the file.
I have tried setting the permissions of all files and the bucket itself to "List" for "Everyone" in the AWS Console, but still no luck.
I have also tried some of the javascript alternatives, but they either don't work under the website url (that redirects to the index file) or just don't work at all. As a last resort, a collapsible javascript listing would be better than nothing, but I haven't found a good one.
Is this possible? If so, do I need to change permissions, ACL or something else?
I've created a simple bit of JS that creates a directory index in HTML style that you are looking for: https://github.com/rgrp/s3-bucket-listing
The README has specific instructions for handling Amazon S3 "website" buckets: https://github.com/rgrp/s3-bucket-listing#website-buckets
You can see a live example of the script in action on this s3 bucket (in website mode): http://data.openspending.org/
There is also this solution: https://github.com/caussourd/aws-s3-bucket-listing
Similar to https://github.com/rgrp/s3-bucket-listing but I couldn't make it work with Internet Explorer. So https://github.com/caussourd/aws-s3-bucket-listing works with IE and also add the possibility to order the files by names, size and date. On the downside, it doesn't follow folders: only the files at one level are displayed.
This might solve your problem. Security settings for Everyone group:
(you need the bucketexplorer.com software for this)
If you are sharing files of HTTP, you may or may not want people to be able to list the contents of a bucket (folder.) If you want the bucket contents to be listed when someone enters the bucket name (http://s3.amazonaws.com/bucket_name/), then edit the Access Control List and give the Everyone group the access level of Read (and do likewise with the contents of the bucket.) If you don’t want the bucket contents list-able but do want to share the file within it, disable Read access for the Everyone group for the bucket itself, and then enable Read access for the individual files within the bucket.
I created a much simpler solution. Just place the index.html file in root of your folder and it will do the job. No configuration required. https://github.com/prabhatsharma/s3-directorylisting
I had a similar problem and created a JavaScript-and-iframe solution that works pretty well for listing directories in S3 website files. You just have to drop a couple of .html files into the directory you want to list. You can find it here:
https://github.com/adam-p/s3-file-list-page
I found s3browser, which allowed me to set up a directory on the main web site that allowed browsing of the s3 bucket. It worked very well and was very easy to set up.
Using another approach base in pure JavaScript and AWS SDK JavaScript API. Not need PHP or other engine just pure web site (Apache or even IIS).
https://github.com/juvs/s3-bucket-browser
Not intent for deploy on your own bucket (for me, no make sense).
Using the new IAM Users from AWS you can provide more specific and secure access to your buckets. No need to publish your bucket to website and make all public.
If you want secure the access, you can use the conventional methods to authenticate users for your current web site.
Hope this help too!

Files not showing in htdocs

When creating a new database through PHPMyAdmin and trying to access localhost/newdatabase, I get this message:
"Object not found! The requested URL was not found on this server. If
you entered the URL manually please check your spelling and try again.
If you think this is a server error, please contact the webmaster.
Error 404 localhost Apache/2.4.34 (Win32) OpenSSL/1.1.0i PHP/7.2.9"
The file doesn't show in xampp/htdocs either, only in xampp/mysql/data.
If i create files directly in htdocs, they work perfectly on localhost/.
Why has the file not been created in htdocs?
The content of the htdocs folder are files that can be interpreted by the browser such as HTML5, CSS, JS, etc... in order to show a webpage along with it's funcionality to whoever accesses it. A database in the other hand can't directly be opened by a browser, but rather accessed within the server by a backend language like PHP, in order to get the information that can be stored in it through tables. You seem to be new to web programming, so I'd recommend to quickly google some beginner tutorials that can help you to understand the most important concepts. To take on from your kind of confusion, I'd point you to expand your knowledge on these concepts:
HTML5
CSS
PHP
MySQL
Once you get the grasp of them and identify each by their core funcionality, you'll be good on your way to make webpages. Later on you'll find yourself with demands like making your webpage look nice and clear, and also to make it load fast, but there's time for everything and the concepts I pointed are the best start for you.
if you wanna open your database URL = http://localhost/phpmyadmin/
File directory ~ xampp/htdocs for source code such as extension file .php .html .js or other.
if you wanna load localhost a URL is http://localhost:80 (auto find index file to first load)
Sample given as image folder for my code. Hope that can help you to understand xampp

Wordpress create widget with link to local file

Hi i´m trying to use the text widget to put a link to local file, but dint work, and I dont know why:
I use this:
Drive C
but if I link to real url it works fine:
Google
If by local you mean it is still on your laptop, you will need to upload the file to your WordPress installation's media folder before using it on the site.
The images should be acsessable to the sever hosting the site, either because it is stored directly by the server, or because it is can be acsessed over the Internet.
If by local you mean it is still on your laptop, you will need to upload the file to your WordPress installation's media folder before using on the site.
Due to your response about it being on the client's device I Think they have to upload the file before the server can work with it.

Embedding images on mediawiki

I have tried to embed an image on mediawiki that I have installed on my server. The images are in this folder /var/www/html/mywiki/images$.
Here is the screenshot of what I see when I save the page to view the image
When I try the upload option, this is the error message i get
[b5f5e4d3] 2016-10-25 12:30:15: Fatal exception of type "MWException"
Where could i be making the mistake?
From my experience with mediawiki, when you upload to the site it stores them in randomzed lettered/numbered folders... ie w/images/9/9d and you have no control over uploading them directly to the folder through your server. I haven't tried directly uploading them, I've always used the wiki itself to upload.
MediaWiki offers some extensions for bulk uploading here:
https://www.mediawiki.org/wiki/Category:Bulk_upload
And you can find them under Special categories once you've installed the Extension and updated your LocalSettings.php to allow them to run.
I personally use BatchUpload (https://www.mediawiki.org/wiki/Extension:SimpleBatchUpload) because I don't have a lot of files to upload at one time, and although it is marked as stable, it sometimes sticks... still better than uploading one at a time.
If you find an alternative way for mass uploading using FTP directly to the server, I would love to know... as I searched for that myself.
Good luck!
You should not upload images manually, but use Special:Upload page to upload image into Mediawiki. Error you've mentioned indicates that there is something wrong with your installation, so you should put $wgShowExceptionDetails = true; into LocalSettings.php to see more details about this error. There is a chance that your /images/ directory is not writable - check its permissions.

Files on the ftp server are not showing up on html site

I've been uploading files to my site successfully up until now. Unfortunately I've been encountering this inexplicable error.
File and edits that show up in the files in my ftp server, are not showing up on my website.
What's happening!
First, double check that you are naming the new/updated files exactly as they are named in the code for your site. It's possible that you are adding files to the server but your current code is linking to pages or documents with the previous names/spellings, not your new files. Second, are you using a client such as FileZilla to upload these files to the ftp server? If so, be sure to check that you are transferring the local files in the queue to the server after they have been added. Additionally, you could try clearing your browser history. Perhaps your browser is using an outdated, cached version of your site.
Is there a better way to clear my cache?
Yah, most easy way is to use CTRL + F5 combination.
This works in most cases and order browser to reload CURRENT page, not from cach, but from the Internet