Why are my files uploaded via sFTP not visible via internet browser?

0

Hi, I recently came from a full-service website host.

I am used to uploading my files to sFTP (eg. photos or webpages) and being able to view them immediately at mysite.com/direc1/example.jpeg etc.

Although I have uploaded the files via sFTP, I cannot view them. The lightsail instance is wordpress and all mysite.com/X requests get directed to the wordpress front page.

Any ideas?

  • the directory is in htdocs. I assumed all htdocs content is public. I created a folder in htdocs called 'stage'. (exact directory bitnami/apache2/htdocs/stage). i expected to be able to view all content uploaded to the stage folder under mysite.com/stage. normally i would previously upload with sFTP, copy URL and then paste it in my web browser.

    all web browser requests on mysite.com/example sends me to the homepage of the wordpress installation

質問済み 8ヶ月前398ビュー
3回答
1

Hello.

Are you getting any errors when trying to display images?
Also, is the directory where you uploaded the images correct?
What are the permissions of the image file?
You can check the permissions of the image file by SSHing into Lightsail and using the following command.

ls -la
profile picture
エキスパート
回答済み 8ヶ月前
  • the directory is in htdocs. I assumed all htdocs content is public. I created a folder in htdocs called 'stage'. (exact directory bitnami/apache2/htdocs/stage). i expected to be able to view all content uploaded to the stage folder under mysite.com/stage. normally i would previously upload with sFTP, copy URL and then paste it in my web browser.

    all web browser requests on mysite.com/example sends me to the homepage of the wordpress installation

  • thank you for your reply. There are access logs and error logs in the directory below, so please check to see if any errors occurred during the time the image was displayed.

    bitnami/apache2/logs/
    

    Also, try changing the permissions with the following command after uploading the image.

    sudo chmod 755 bitnami/apache2/htdocs/stage/example.jpeg
    sudo chown bitnami:daemon bitnami/apache2/htdocs/stage/example.jpeg
    

    You can SSH to Lightsail by following the steps in the document below. https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-ssh-using-terminal

0

the directory is in htdocs. I assumed all htdocs content is public. I created a folder in htdocs called 'stage'. (exact directory bitnami/apache2/htdocs/stage). i expected to be able to view all content uploaded to the stage folder under mysite.com/stage. normally i would previously upload with sFTP, copy URL and then paste it in my web browser.

all web browser requests on mysite.com/example sends me to the homepage of the wordpress installation

回答済み 8ヶ月前
0

I hope my response makes sense?

回答済み 8ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ