<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ahmet Onur Solmaz</title>
    <description>The latest articles on DEV Community by Ahmet Onur Solmaz (@ahmetonurslmz).</description>
    <link>https://dev.to/ahmetonurslmz</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F206529%2F066b4338-a6f5-4431-b496-58492563801e.jpeg</url>
      <title>DEV Community: Ahmet Onur Solmaz</title>
      <link>https://dev.to/ahmetonurslmz</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ahmetonurslmz"/>
    <language>en</language>
    <item>
      <title>How to build PHP Image from Scratch</title>
      <dc:creator>Ahmet Onur Solmaz</dc:creator>
      <pubDate>Wed, 04 Jan 2023 20:07:00 +0000</pubDate>
      <link>https://dev.to/ahmetonurslmz/how-to-build-php-image-from-scratch-49j3</link>
      <guid>https://dev.to/ahmetonurslmz/how-to-build-php-image-from-scratch-49j3</guid>
      <description>&lt;p&gt;PHP applications easily. Please keep in mind, this is development purposes for beginners. We will publish new article for production purposes.&lt;/p&gt;

&lt;p&gt;Let's get started.&lt;/p&gt;

&lt;h2&gt;
  
  
  Preparing Dockerfile for base PHP applications
&lt;/h2&gt;

&lt;p&gt;Firstly, create Dockerfile to list configuration. At the beginning of the page, we start by adding this line.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;FROM php&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This enables us to install php.&lt;/p&gt;

&lt;p&gt;Secondly, we add a new line to use files.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;COPY . .&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;So that you can access every files in main root. However, if you wish use to only specific files, you can specify them manually like:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;COPY ./index.php ./&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Thanks to this, you can just move specific files and they are available to use.&lt;/p&gt;

&lt;p&gt;In the next step, we expose desired port to run php application.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;EXPOSE 3000&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;At the end of the file, we can run our app by executing following command line.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;CMD ["php", "-S", "0.0.0.0:3000"]&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;To make life easier for you, you can get the file entirely.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;FROM php&lt;br&gt;
COPY . .&lt;br&gt;
EXPOSE 3000&lt;br&gt;
CMD ["php", "-S", "0.0.0.0:3000"]&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Installing docker image
&lt;/h2&gt;

&lt;p&gt;Executing this command line, you can get php image.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;docker build . -t w3cloudhub/php&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Running docker image
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;docker run --name=php -p=3000:3000 w3cloudhub/php&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Congratulations! 🥳 If you see following line in the CMD, your dockerfile and image are ready to use.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;PHP 8.2.0 Development Server (http://0.0.0.0:3000) started&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Thank you for reading. Please leave a comment about your feelings and any issues.&lt;/p&gt;

</description>
      <category>php</category>
      <category>docker</category>
      <category>cloud</category>
      <category>programming</category>
    </item>
    <item>
      <title>What is actually .well-known folder?</title>
      <dc:creator>Ahmet Onur Solmaz</dc:creator>
      <pubDate>Fri, 18 Nov 2022 15:52:39 +0000</pubDate>
      <link>https://dev.to/ahmetonurslmz/what-is-actually-well-known-folder-216a</link>
      <guid>https://dev.to/ahmetonurslmz/what-is-actually-well-known-folder-216a</guid>
      <description>&lt;p&gt;If you built a website, you have already seen .well-known path but I claim that you do not know what it is and why it is there. 🙂&lt;/p&gt;

&lt;p&gt;When you setup a website on cpanel or pleks and then access to file system of the website, there is a folder or path that is called .well-known.&lt;/p&gt;

&lt;p&gt;We are familiar with the name but most of us don’t care what it is actually.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is .well-known folder?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://en.ahmetonursolmaz.com.tr/what-is-meaning-of-well-known-path/"&gt;.well-known folder&lt;/a&gt; or path name is about giving reference to your website or app from other services. To illustrate, when you visit password manager inside chrome browser for a specific website and click to change password, it redirects you to website’s .well-known/change-password page. If the website that you want to change your password is already handled, you will be automatically redirected to website’s password change page. If not, as a user you will be disappointed.&lt;/p&gt;

&lt;h2&gt;
  
  
  How should we handle .well-know/change-password route?
&lt;/h2&gt;

&lt;p&gt;There are actually 2 ways to handle this.&lt;/p&gt;

&lt;h3&gt;
  
  
  Redirecting the path to desired page
&lt;/h3&gt;

&lt;p&gt;Assume that we have auth/forget-password page that enables user to change their password on our app. We just need to set our server to redirect requests from .well-known/change-password path to auth/forget-password page.&lt;/p&gt;

&lt;p&gt;Redirecting via giving a response with 302, 303 or 307 status code can be accepted.&lt;/p&gt;

&lt;p&gt;302 Status Code – Found&lt;/p&gt;

&lt;p&gt;303 Status Code – See Other&lt;/p&gt;

&lt;p&gt;307 Status Code – Temporary Redirect&lt;/p&gt;

&lt;h3&gt;
  
  
  Serving via HTML
&lt;/h3&gt;

&lt;p&gt;You can simply add this meta tag in html file that is located .well-known/change-password path, the route will redirect users to desired page.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;meta http-equiv="refresh" content="0;url=https://example.com/auth/forget-password"&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The .well-known/change-password practice is accepted by nearly entire web world. You can improve user experience on your web apps so that real users can access password change page properly from redirecting password managers or browsers to your app.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do we test .well-known/change password function?
&lt;/h2&gt;

&lt;p&gt;Simply copy and paste this &lt;strong&gt;chrome://settings/passwords/&lt;/strong&gt; URL in your chrome browser. And then click to change password button in right-hand side of any saved password. The button will redirect user to website’s password change page. (of course if it is already setup 🙂 )&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkjc501pqjxouvoayz9ai.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkjc501pqjxouvoayz9ai.png" alt="Image description" width="800" height="276"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Furthermore, there are lots of &lt;a href="https://en.ahmetonursolmaz.com.tr/what-is-meaning-of-well-known-path/"&gt;.well-known folder&lt;/a&gt; practices and you can check them out here as we add step by step.&lt;/p&gt;

&lt;p&gt;We list important but not known technical updates here in our &lt;a href="https://en.ahmetonursolmaz.com.tr/software-world-updates/"&gt;&lt;strong&gt;software world updates page&lt;/strong&gt;&lt;/a&gt;. You can follow new improvements and updates in software world.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>html</category>
      <category>javascript</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Request/Response Cycle of Django — Basic</title>
      <dc:creator>Ahmet Onur Solmaz</dc:creator>
      <pubDate>Sun, 28 Nov 2021 10:43:29 +0000</pubDate>
      <link>https://dev.to/ahmetonurslmz/requestresponse-cycle-of-django-basic-4n7f</link>
      <guid>https://dev.to/ahmetonurslmz/requestresponse-cycle-of-django-basic-4n7f</guid>
      <description>&lt;p&gt;Django is a popular framework that is used by many high level tech companies for back-end development. Django has lots of handy structure to handle web applications. One of them is request/response cycle of django that we will cover today.&lt;br&gt;
Article is &lt;a href="https://ahmetonursolmaz.org/request-response-cycle-of-django-basic/"&gt;&lt;strong&gt;here&lt;/strong&gt;&lt;/a&gt;!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://ahmetonursolmaz.org/request-response-cycle-of-django-basic/"&gt;https://ahmetonursolmaz.org/request-response-cycle-of-django-basic/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6cf3x20wdvtpjdif63co.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6cf3x20wdvtpjdif63co.png" alt="Image description" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>django</category>
      <category>python</category>
      <category>programming</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
