skip to Main Content

this is my first time using ubuntu server and i want to give it a try. I already did the apache2, mysql, phpmyadmin install, and VirtualHost setup. And I already download my program from github on /var/www/html/project/. Usually when I run redirect my VirtualHost to /var/www/html/project/public laravel would automatically start, but instead i got show a coding from /var/www/html/project/public/index.php. What did i do wrong?

to setup VirtualHost first I type sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/project.dev.conf and type this code

<VirtualHost *:80>
    ServerName project.dev
    ServerAdmin [email protected]
    DocumentRoot /var/www/html/project/public
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/custom.log combined
</VirtualHost>

and then on terminal I typed sudo a2ensite project.dev.conf then restart sudo systemctl reload apache2

I followed this link https://help.ubuntu.com/lts/serverguide/httpd.html

2

Answers


  1. As you had listed you had already installed the apache2, mysql, phpmyadmin. According to me you are not installing the php on your ubuntu server. Try for checking the

    <?php echo phpinfo(); ?>
    

    If not then you can install by the following command:

    sudo apt-get install php7.2 php7.2-cli php7.2-common
    

    And by following command you can download the most commonly used php extensions:

    sudo apt-get install php7.2-curl php7.2-gd php7.2-json php7.2-mbstring php7.2-intl php7.2-mysql php7.2-xml php7.2-zip
    

    After that you can install and setup the firewall for security purpose. And don’t forget to protect your phpmyadmin page from direct opening.

    Login or Signup to reply.
  2. change .dev to .qa

    google chrome update prohibits to use .dev locally.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search