Month: March 2023

  • MacOS XAMPP, setup example.com website

    To set up a website with XAMPP on macOS and create a virtual host for it, you can follow these steps:

    1. Open the Terminal application on your Mac.
    2. Navigate to the XAMPP directory by typing the following command:
      cd /Applications/XAMPP
    3. Once you are in the XAMPP directory, navigate to the Apache configuration folder by typing the following command:
      cd etc/apache2
    4. In the Apache configuration folder, you will find a file called httpd.conf. Open this file in a text editor such as nano or vim by typing the following command:
      sudo nano httpd.conf
    5. In the httpd.conf file, locate the following line:
      # Virtual hosts
      # Include etc/extra/httpd-vhosts.conf
    6. Remove the # at the beginning of the second line to uncomment it.
    7. Save and close the httpd.conf file.
    8. Navigate to the Apache extra configuration folder by typing the following command:
      cd extra
    9. In the extra folder, you will find a file called httpd-vhosts.conf. Open this file in a text editor by typing the following command:
      sudo nano httpd-vhosts.conf
    10. At the bottom of the file, add the following code to create a virtual host for your WordPress website:
      <VirtualHost *:80>
          DocumentRoot "/Applications/XAMPP/htdocs/example.com"
          ServerName example.com
          ServerAlias www.example.com
          ErrorLog "/Applications/XAMPP/logs/example.com-error_log"
          CustomLog "/Applications/XAMPP/logs/example.com-access_log" common
          <Directory "/Applications/XAMPP/htdocs/example.com">
              AllowOverride All
          </Directory>
      </VirtualHost>
    11. Replace “example.com” with your website’s domain name.
    12. Save and close the httpd-vhosts.conf file.
    13. Restart Apache by typing the following command:
      sudo /Applications/XAMPP/xamppfiles/bin/apachectl restart
    14. Download and install WordPress into the newly created directory (example.com in this example) by following the instructions on the WordPress website.
    15. Open your web browser and type in your website’s domain name (e.g. http://example.com) to access your WordPress website.
    MacOS XAMPP, setup example.com website
  • Web devs be like…

    Source:

  • NEW Folding Carbine from Smith & Wesson: The FPC

    Smith & Wesson have a new firearm that has me interested…

    Ooof, what can I say???

  • 4-Minute Video: Using theme.json with classic themes in WordPress

    4-Minute Video: Using theme.json with classic themes in #WordPress >> The theme.json is a file that allows block theme developers to control the settings and styles of the blocks in the block editor. But you can use it for classic themes too! https://learn.wordpress.org/tutorial/using-theme-json-with-classic-themes/ #LearnWP

    Originally tweeted by WordPress (@WordPress) on March 11, 2023.

  • Lawyer reacts to settlement website design

    I’m curious, what should a settlement website look like?

  • Example GitHub PHP Project

    As a former independent web developer, I had very little use for GitHub as my project base consisted of small business owners and their requirements mostly never got past having a WordPress website and business email setup.

    Today, using Git repos are vital for my workflow as I’ve been working with various teams to push web apps to live status. Now, I can’t picture not using Git repos for any project. After being a largely siloed developer, my work is now part of a very collaborative process.

    With that said, I’ve been working on a personal project, jsldvr/example.com, which is a PHP web app that is supposed to make developing a website as easy as possible for those that use cPanel or AWS. The app is more of an exercise in learning how to use GitHub, and building a secure PHP app from scratch.

    I don’t have a road map with this project. I simply want to have fun with it and learn as much as I can about collaborating and/or developing on GitHub.

    Example GitHub PHP Project
  • Could not reliably determine the server’s fully qualified domain name, using ::1.

    Preface:

    I’ve been using ChatGPT as a development tool as of late. Prior to searching for possible bug fixes, I’ll check to see if ChatGPT has an answer to what I would normally use as a query on Google or Bing. In this instance, I receive the following error after running service apache2 start.

    Me:

    AH00558: apache2: Could not reliably determine the server’s fully qualified domain name, using ::1. Set the ‘ServerName’ directive globally to suppress this message

    ChatGPT:

    This message is generated by the Apache web server and is indicating that the server is not configured with a fully qualified domain name (FQDN) for the current IP address.

    To resolve this issue, you can set the ServerName directive globally in the Apache configuration file to specify the FQDN of your server. This can be done by following these steps:

    1. Open the Apache configuration file for editing. This is typically located at /etc/apache2/apache2.conf or /etc/httpd/conf/httpd.conf.
    2. Search for the ServerName directive. If it is commented out (i.e., prefixed with a #), remove the # character to uncomment the line.
    3. If the ServerName directive does not exist, add it to the configuration file as follows:
    ServerName yourserver.example.com

    Replace yourserver.example.com with the FQDN of your server.

    1. Save the configuration file and restart the Apache service to apply the changes:
    sudo service apache2 restart
    

    After completing these steps, the message should no longer appear and the Apache web server should be able to determine the server’s FQDN.

    Result:

    The error did not repeat itself.

    Could not reliably determine the server’s fully qualified domain name, using ::1.