Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Add support for Apache #89

Open
domaingood opened this issue Jun 14, 2022 · 6 comments
Open

Feature: Add support for Apache #89

domaingood opened this issue Jun 14, 2022 · 6 comments
Labels
enhancement New feature or request

Comments

@domaingood
Copy link

domaingood commented Jun 14, 2022

https://marketplace.digitalocean.com/apps/laravel
Please add
Apache+
OpenLiteSpeed
phpMyAdmin
Redis
Upgrade PHP 8.1

@domaingood domaingood added the help wanted Extra attention is needed label Jun 14, 2022
@bobbyiliev
Copy link
Collaborator

Hi there @domaingood,

What is the main benefit of switching from Nginx to Apache?

Regarding phpMyAdmin, I would prefer to keep the 1-Click installation clean for such additional resources as you can easily install them if you need them:

wget https://files.phpmyadmin.net/phpMyAdmin/5.0.2/phpMyAdmin-5.0.2-all-languages.zip
unzip phpMyAdmin-5.0.2-all-languages.zip
mv phpMyAdmin-5.0.2-all-languages /var/www/public/phpmyadmin

@SamuelMwangiW
Copy link
Collaborator

In addition to Bobby's comment, you can use Larasail to set up PHP8.1 and Redis.

larasail setup php81 redis

Hi there @domaingood,

What is the main benefit of switching from Nginx to Apache?

Regarding phpMyAdmin, I would prefer to keep the 1-Click installation clean for such additional resources as you can easily install them if you need them:

wget https://files.phpmyadmin.net/phpMyAdmin/5.0.2/phpMyAdmin-5.0.2-all-languages.zip
unzip phpMyAdmin-5.0.2-all-languages.zip
mv phpMyAdmin-5.0.2-all-languages /var/www/public/phpmyadmin

@domaingood
Copy link
Author

We dont know how to config Nginx.Other hand Apache easy to use.You can use [openlitespeed] if need more benefit.

Hi there @domaingood,

What is the main benefit of switching from Nginx to Apache?

Regarding phpMyAdmin, I would prefer to keep the 1-Click installation clean for such additional resources as you can easily install them if you need them:

wget https://files.phpmyadmin.net/phpMyAdmin/5.0.2/phpMyAdmin-5.0.2-all-languages.zip
unzip phpMyAdmin-5.0.2-all-languages.zip
mv phpMyAdmin-5.0.2-all-languages /var/www/public/phpmyadmin

@bobbyiliev
Copy link
Collaborator

To be honest, I personally have never used OpenLitespeed together with Laravel.

Nginx is actually easier to configure than Apache, all you need is PHP-FPM and the following server block:

server {
        root $rootPath/public;
        index index.php index.html index.htm;
        server_name $serverName;
        location / {
                try_files \$uri \$uri/ /index.php?\$query_string;
        }
        location ~*  \.(jpg|jpeg|png|gif)\$1 {
                expires 365d;
        }
        location ~*  \.(ico|css|js)\$ {
                expires 365d;
        }
        location ~ \.php\$ {
                include snippets/fastcgi-php.conf;
                fastcgi_pass unix:/run/php/php$phpVersion-fpm.sock;
        }
        location ~ /\.ht {
                deny all;
        }
}

And even with the LaraSail script, you don't really need to do any config changes.

I am not sure if we will ever add Apache rather than Nginx for LaraSail as the majority of people would default to Nginx anyway. If you still prefer Apache, you can always install a LAMP server with 1-Click via this link here:

https://marketplace.digitalocean.com/apps/lamp

And then deploy Laravel there.

Of course, we are open to suggestions, if we see enough demand for Apache, we could look into this. Also feel free to submit a PR if you wish.

@bobbyiliev bobbyiliev changed the title Help: Laravel Help: Add support for Apache Jun 15, 2022
@bobbyiliev bobbyiliev changed the title Help: Add support for Apache Feature: Add support for Apache Jun 15, 2022
@bobbyiliev bobbyiliev added enhancement New feature or request and removed help wanted Extra attention is needed labels Jun 15, 2022
@domaingood
Copy link
Author

After freash install from
https://marketplace.digitalocean.com/apps/laravel
then
larasail setup php81 redis
is currently unable to handle this request.
HTTP ERROR 500

In addition to Bobby's comment, you can use Larasail to set up PHP8.1 and Redis.

larasail setup php81 redis

Hi there @domaingood,
What is the main benefit of switching from Nginx to Apache?
Regarding phpMyAdmin, I would prefer to keep the 1-Click installation clean for such additional resources as you can easily install them if you need them:

wget https://files.phpmyadmin.net/phpMyAdmin/5.0.2/phpMyAdmin-5.0.2-all-languages.zip
unzip phpMyAdmin-5.0.2-all-languages.zip
mv phpMyAdmin-5.0.2-all-languages /var/www/public/phpmyadmin

@bobbyiliev
Copy link
Collaborator

bobbyiliev commented Jun 15, 2022

Note: Do not use the larasail setup command with the 1-click Laravel installation!

  • The 1-Click install is already pre-configured and you can't run the larasail setup command. The setup command is only executed once on a fresh new Droplet. Please refer to the README.md file for more details.
  • If you want to use the larasail setup command, you can just setup a plain Ubuntu 20.04 server and then run the command
  • The 1-Click image is just a quicker way to get a Droplet up and running but limits you to the pre-installed configuration.

If you want Redis just run sudo apt -y install redis-server.

Also note that the LaraSail script and the 1-Click installation are two separate things. If you have any feedback for the 1-Click image refer to this repo here:

https://github.com/bobbyiliev/laravel-digitalocean-1-click

Let me know if you have any questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants