You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Hello,
on my local computer I have a repo with php-code like this:
Because for local development and testing I have a local web server which points to the root-folder I can easily access my index.php without the htaccess-check.
But on my online-server (for other users) I want to have a result like this:
My question: How can I do this with Bitbucket Pipeline?
I need ideas please how to move the 2 files from the sub-folder to root-directory during the build process.
The upload via FTP is already running... here a part from my bitbucket-pipelines.yml:
- pipe: atlassian/ftp-deploy:0.3.7
variables:
USER: $FTP_USER
SERVER: ftp.strato.de
REMOTE_PATH: /
PASSWORD: $FTP_PASSWORD
If you have better ideas instead of atlassian/ftp-deploy I'm open for ideas too :-)
PS: SFTP is not running with Strato... For ssh.strato.de there was this error message coming up > but FTP was working:
Many thanks :-)
Michael
Update
I found another solution with .htaccess which I want to share with you.
In my repo I work now with this:
And I updated the .htaccess by a host-check... Which is possible in Apache...
<If "req('Host') == 'domain-xyz.com'">
AuthName "Prompt"
AuthType Basic
AuthUserFile /home/htdocs/domain-xyz.com/.htpasswd
Require valid-user
RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule (.*) https://%{HTTP_HOST}/$1 [R=301,L]
</If>
<Else>
Require all granted
</Else>
So now the htaccess-protection is only used on my online server (host = domain-xyz.com), but not on my local dev environment.
BUT: I'm interested in a solution for my question too :-)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.