Raspberry Pi Web Server Login Page












0














Recently I have managed to finally set up a web server on my Raspberry Pi 3B using NGINX. So far I have created a page which has a loading animation and after five seconds goes to a log in page which is based on the w3schools login form. At the moment this page does absolutely nothing.



Here is the login page code:



<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<div id="title">
<h2>Server Login</h2>
</div id="title">
<style>
body {font-family:"Helvetica Light","PibotoLt","Helvetica Neue";}
form {border: 3px solid #FFFFFF;}
div#title{
text-align: center;
}
input[type=text], input[type=password] {
width: 100%;
padding: 12px 20px;
margin: 8px 0;
display: inline-block;
border: 1px solid #FFFFFF;
box-sizing: border-box;
}

button {
background-color: #4CAF50;
color: white;
padding: 14px 20px;
margin: 8px 0;
border: none;
cursor: pointer;
width: 100%;
}

button:hover {
opacity: 0.8;
}

.imgcontainer {
text-align: center;
margin: 24px 0 12px 0;
}

img.avatar {
width: 15%;
border-radius: 25%;
}

.container {
padding: 16px;
}

span.psw {
float: right;
padding-top: 16px;
}
</style>
</head>
<body>
<form action="users page url is going to go hear">
<div class="imgcontainer">
<img src="img_avatar2.png" alt="Avatar" class="avatar">
</div>

<div class="container">
<label for="uname"><b>Username</b></label>
<input type="text" placeholder="Username" name="uname" required>

<label for="psw"><b>Password</b></label>
<input type="password" placeholder="Password" name="psw" required>

<button type="submit">Login</button>

</form>

</body>
</html>


I have been doing research into how to store usernames and passwords in a database such as mysqli but having absolutely no success in how to do that. I think that you have a PHP script with details on how to access the database, the database is stored locally on the Raspberry Pi so that a hacker cannot inject code and find out the passwords because even if he managed to view the file, it would be unreadable.












share







New contributor




Deon Leggett is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

























    0














    Recently I have managed to finally set up a web server on my Raspberry Pi 3B using NGINX. So far I have created a page which has a loading animation and after five seconds goes to a log in page which is based on the w3schools login form. At the moment this page does absolutely nothing.



    Here is the login page code:



    <!DOCTYPE html>
    <html>
    <head>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <div id="title">
    <h2>Server Login</h2>
    </div id="title">
    <style>
    body {font-family:"Helvetica Light","PibotoLt","Helvetica Neue";}
    form {border: 3px solid #FFFFFF;}
    div#title{
    text-align: center;
    }
    input[type=text], input[type=password] {
    width: 100%;
    padding: 12px 20px;
    margin: 8px 0;
    display: inline-block;
    border: 1px solid #FFFFFF;
    box-sizing: border-box;
    }

    button {
    background-color: #4CAF50;
    color: white;
    padding: 14px 20px;
    margin: 8px 0;
    border: none;
    cursor: pointer;
    width: 100%;
    }

    button:hover {
    opacity: 0.8;
    }

    .imgcontainer {
    text-align: center;
    margin: 24px 0 12px 0;
    }

    img.avatar {
    width: 15%;
    border-radius: 25%;
    }

    .container {
    padding: 16px;
    }

    span.psw {
    float: right;
    padding-top: 16px;
    }
    </style>
    </head>
    <body>
    <form action="users page url is going to go hear">
    <div class="imgcontainer">
    <img src="img_avatar2.png" alt="Avatar" class="avatar">
    </div>

    <div class="container">
    <label for="uname"><b>Username</b></label>
    <input type="text" placeholder="Username" name="uname" required>

    <label for="psw"><b>Password</b></label>
    <input type="password" placeholder="Password" name="psw" required>

    <button type="submit">Login</button>

    </form>

    </body>
    </html>


    I have been doing research into how to store usernames and passwords in a database such as mysqli but having absolutely no success in how to do that. I think that you have a PHP script with details on how to access the database, the database is stored locally on the Raspberry Pi so that a hacker cannot inject code and find out the passwords because even if he managed to view the file, it would be unreadable.












    share







    New contributor




    Deon Leggett is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.























      0












      0








      0







      Recently I have managed to finally set up a web server on my Raspberry Pi 3B using NGINX. So far I have created a page which has a loading animation and after five seconds goes to a log in page which is based on the w3schools login form. At the moment this page does absolutely nothing.



      Here is the login page code:



      <!DOCTYPE html>
      <html>
      <head>
      <meta name="viewport" content="width=device-width, initial-scale=1">
      <div id="title">
      <h2>Server Login</h2>
      </div id="title">
      <style>
      body {font-family:"Helvetica Light","PibotoLt","Helvetica Neue";}
      form {border: 3px solid #FFFFFF;}
      div#title{
      text-align: center;
      }
      input[type=text], input[type=password] {
      width: 100%;
      padding: 12px 20px;
      margin: 8px 0;
      display: inline-block;
      border: 1px solid #FFFFFF;
      box-sizing: border-box;
      }

      button {
      background-color: #4CAF50;
      color: white;
      padding: 14px 20px;
      margin: 8px 0;
      border: none;
      cursor: pointer;
      width: 100%;
      }

      button:hover {
      opacity: 0.8;
      }

      .imgcontainer {
      text-align: center;
      margin: 24px 0 12px 0;
      }

      img.avatar {
      width: 15%;
      border-radius: 25%;
      }

      .container {
      padding: 16px;
      }

      span.psw {
      float: right;
      padding-top: 16px;
      }
      </style>
      </head>
      <body>
      <form action="users page url is going to go hear">
      <div class="imgcontainer">
      <img src="img_avatar2.png" alt="Avatar" class="avatar">
      </div>

      <div class="container">
      <label for="uname"><b>Username</b></label>
      <input type="text" placeholder="Username" name="uname" required>

      <label for="psw"><b>Password</b></label>
      <input type="password" placeholder="Password" name="psw" required>

      <button type="submit">Login</button>

      </form>

      </body>
      </html>


      I have been doing research into how to store usernames and passwords in a database such as mysqli but having absolutely no success in how to do that. I think that you have a PHP script with details on how to access the database, the database is stored locally on the Raspberry Pi so that a hacker cannot inject code and find out the passwords because even if he managed to view the file, it would be unreadable.












      share







      New contributor




      Deon Leggett is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      Recently I have managed to finally set up a web server on my Raspberry Pi 3B using NGINX. So far I have created a page which has a loading animation and after five seconds goes to a log in page which is based on the w3schools login form. At the moment this page does absolutely nothing.



      Here is the login page code:



      <!DOCTYPE html>
      <html>
      <head>
      <meta name="viewport" content="width=device-width, initial-scale=1">
      <div id="title">
      <h2>Server Login</h2>
      </div id="title">
      <style>
      body {font-family:"Helvetica Light","PibotoLt","Helvetica Neue";}
      form {border: 3px solid #FFFFFF;}
      div#title{
      text-align: center;
      }
      input[type=text], input[type=password] {
      width: 100%;
      padding: 12px 20px;
      margin: 8px 0;
      display: inline-block;
      border: 1px solid #FFFFFF;
      box-sizing: border-box;
      }

      button {
      background-color: #4CAF50;
      color: white;
      padding: 14px 20px;
      margin: 8px 0;
      border: none;
      cursor: pointer;
      width: 100%;
      }

      button:hover {
      opacity: 0.8;
      }

      .imgcontainer {
      text-align: center;
      margin: 24px 0 12px 0;
      }

      img.avatar {
      width: 15%;
      border-radius: 25%;
      }

      .container {
      padding: 16px;
      }

      span.psw {
      float: right;
      padding-top: 16px;
      }
      </style>
      </head>
      <body>
      <form action="users page url is going to go hear">
      <div class="imgcontainer">
      <img src="img_avatar2.png" alt="Avatar" class="avatar">
      </div>

      <div class="container">
      <label for="uname"><b>Username</b></label>
      <input type="text" placeholder="Username" name="uname" required>

      <label for="psw"><b>Password</b></label>
      <input type="password" placeholder="Password" name="psw" required>

      <button type="submit">Login</button>

      </form>

      </body>
      </html>


      I have been doing research into how to store usernames and passwords in a database such as mysqli but having absolutely no success in how to do that. I think that you have a PHP script with details on how to access the database, the database is stored locally on the Raspberry Pi so that a hacker cannot inject code and find out the passwords because even if he managed to view the file, it would be unreadable.










      raspberry-pi login nginx webserver





      share







      New contributor




      Deon Leggett is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.










      share







      New contributor




      Deon Leggett is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      share



      share






      New contributor




      Deon Leggett is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 5 mins ago









      Deon LeggettDeon Leggett

      1




      1




      New contributor




      Deon Leggett is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      Deon Leggett is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      Deon Leggett is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          0






          active

          oldest

          votes











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "106"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });






          Deon Leggett is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f493043%2fraspberry-pi-web-server-login-page%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          Deon Leggett is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          Deon Leggett is a new contributor. Be nice, and check out our Code of Conduct.













          Deon Leggett is a new contributor. Be nice, and check out our Code of Conduct.












          Deon Leggett is a new contributor. Be nice, and check out our Code of Conduct.
















          Thanks for contributing an answer to Unix & Linux Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f493043%2fraspberry-pi-web-server-login-page%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          濃尾地震

          How to rewrite equation of hyperbola in standard form

          No ethernet ip address in my vocore2