Mailing List Archive

Ubuntu/Apache2/laravel - test project setup in subdirs
Hi.

Setting up a test laravel app to run as a subdir:
ie /var/www/html/wave/wave/public (index.php)

the idea is to have the url
http://1.2.3.4/wave (is this possible? or dies it need to be
http://1.2.3.4/wave/index.php in the url ??

I'd also like the base url to be
http://1.2.3.4 --- to have a default page

Having the test laravel apps in subdirs gives the project multiple test apps.

I'd like the urls to be similar to
http//1.2.3.4/app1
http//1.2.3.4/app2..

which means changes to the
/etc/apache2/mods-available/alias.conf file

and the
/etc/apache2/sites-available/wave1.conf wave2.conf... for the
VirtHost setup

As far as I can tell.. I think the basic "laravel" app displays sort of ok..
at least from the top url...

However, the current test setup gives errs from the subdir.. which
implies something amiss.

So, I'm posting here, hoping that someone has set something up similar
to what I'm going through.

I'm more than willing to give complete access to the test digital
ocean Ubuntu droplet/instance to check out this issue.

thanks

the test url --- http: // 161.35.5.174 http: //
161.35.5.174/ wave

I realize this is more for laravel... but I'm throwing this out on a prayer!!

thanks! again

ps..

the basic dirr tree
/var/www/html/wave/wave/public/index.php

so the 2nd would be
/var/www/htmlwave2/wave/public/index.php
(at least I think it would be this...)

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: Ubuntu/Apache2/laravel - test project setup in subdirs [ In reply to ]
On Sun, Nov 12, 2023 at 6:47?PM bruce <badouglas@gmail.com> wrote:

> Hi.
>
> Setting up a test laravel app to run as a subdir:
> ie /var/www/html/wave/wave/public (index.php)
>
> the idea is to have the url
> http://1.2.3.4/wave (is this possible? or dies it need to be
> http://1.2.3.4/wave/index.php in the url ??
>
> I'd also like the base url to be
> http://1.2.3.4 --- to have a default page
>
> Having the test laravel apps in subdirs gives the project multiple test
> apps.
>
> I'd like the urls to be similar to
> http//1.2.3.4/app1
> http//1.2.3.4/app2..
>
> which means changes to the
> /etc/apache2/mods-available/alias.conf file
>
> and the
> /etc/apache2/sites-available/wave1.conf wave2.conf... for the
> VirtHost setup
>
> As far as I can tell.. I think the basic "laravel" app displays sort of
> ok..
> at least from the top url...
>
> However, the current test setup gives errs from the subdir.. which
> implies something amiss.
>
> So, I'm posting here, hoping that someone has set something up similar
> to what I'm going through.
>
> I'm more than willing to give complete access to the test digital
> ocean Ubuntu droplet/instance to check out this issue.
>
> thanks
>
> the test url --- http: // 161.35.5.174 http: //
> 161.35.5.174/ wave
>
> I realize this is more for laravel... but I'm throwing this out on a
> prayer!!
>
> thanks! again
>
> ps..
>
> the basic dirr tree
> /var/www/html/wave/wave/public/index.php
>
> so the 2nd would be
> /var/www/htmlwave2/wave/public/index.php
> (at least I think it would be this...)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
Again, all you need is the Alias directive, and you didn't show the errors
you encountered.

And you created a new thread, yet again.
Re: Ubuntu/Apache2/laravel - test project setup in subdirs [ In reply to ]
Frank, I create the alias in the mod.confcat
/etc/apache2/mods-available/alias.conf
# Aliases: Add here as many aliases as you need (with no limit). The format is
# Alias fakename realname
#
# Note that if you include a trailing / on fakename then the server will
# require it to be present in the URL. So "/icons" isn't aliased in this
# example, only "/icons/". If the fakename is slash-terminated, then the
# realname must also be slash terminated, and if the fakename omits the
# trailing slash, the realname must also omit it.
#
# We include the /icons/ alias for FancyIndexed directory listings. If
# you do not use FancyIndexing, you may comment this out.

Alias /icons/ "/usr/share/apache2/icons/"
#Alias /wave/ "/var/www/html/wave"
#Alias /wave/ "/var/www/html/wave"
Alias /wave/ "/var/www/html/wave/wave/public/"


<Directory "/usr/share/apache2/icons">
Options FollowSymlinks
AllowOverride None
Require all granted
</Directory>

at the same time.. here's the wave.conf for the VirtualHost directive.

root@ubuntu-s-1vcpu-2gb-nyc1-01:/var/www/html# cat
/etc/apache2/sites-available/wave.conf
<VirtualHost *:80>
ServerAdmin foo@yahoo.com
ServerName temp2
ServerAlias temp
DocumentRoot /var/www/html/wave/wave/public

<Directory /var/www/html/wave/wave/public>

DirectoryIndex index.html index.php

Options -Indexes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
##Options -Indexes +FollowSymLinks +MultiViews
AllowOverride All Require all granted


##Options Indexes FollowSymLinks MultiViews
##Options -Indexes FollowSymlinks
#Options FollowSymlinks
#AllowOverride All
##Order allow,deny
##allow from all
#Require all granted
</Directory>

LogLevel debug
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

the target url that's giving me an issue..

http://161.35.5.174/wave/ <<<< current live site for now
Symfony?\?Component?\?HttpKernel?\?Exception?\?MethodNotAllowedHttpException
PHP 8.2.10-2ubuntu1
9.52.16
The GET method is not supported for route /. Supported methods: HEAD...
.
.
.

which is interesting.. if I knew what it meant!


On Sun, Nov 12, 2023 at 7:20?PM Frank Gingras <thumbs@apache.org> wrote:
>
>
>
> On Sun, Nov 12, 2023 at 6:47?PM bruce <badouglas@gmail.com> wrote:
>>
>> Hi.
>>
>> Setting up a test laravel app to run as a subdir:
>> ie /var/www/html/wave/wave/public (index.php)
>>
>> the idea is to have the url
>> http://1.2.3.4/wave (is this possible? or dies it need to be
>> http://1.2.3.4/wave/index.php in the url ??
>>
>> I'd also like the base url to be
>> http://1.2.3.4 --- to have a default page
>>
>> Having the test laravel apps in subdirs gives the project multiple test apps.
>>
>> I'd like the urls to be similar to
>> http//1.2.3.4/app1
>> http//1.2.3.4/app2..
>>
>> which means changes to the
>> /etc/apache2/mods-available/alias.conf file
>>
>> and the
>> /etc/apache2/sites-available/wave1.conf wave2.conf... for the
>> VirtHost setup
>>
>> As far as I can tell.. I think the basic "laravel" app displays sort of ok..
>> at least from the top url...
>>
>> However, the current test setup gives errs from the subdir.. which
>> implies something amiss.
>>
>> So, I'm posting here, hoping that someone has set something up similar
>> to what I'm going through.
>>
>> I'm more than willing to give complete access to the test digital
>> ocean Ubuntu droplet/instance to check out this issue.
>>
>> thanks
>>
>> the test url --- http: // 161.35.5.174 http: //
>> 161.35.5.174/ wave
>>
>> I realize this is more for laravel... but I'm throwing this out on a prayer!!
>>
>> thanks! again
>>
>> ps..
>>
>> the basic dirr tree
>> /var/www/html/wave/wave/public/index.php
>>
>> so the 2nd would be
>> /var/www/htmlwave2/wave/public/index.php
>> (at least I think it would be this...)
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>
>
> Again, all you need is the Alias directive, and you didn't show the errors you encountered.
>
> And you created a new thread, yet again.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: Ubuntu/Apache2/laravel - test project setup in subdirs [ In reply to ]
> Date: Sunday, November 12, 2023 21:48:57 -0500
> From: bruce <badouglas@gmail.com>
>
>
> the target url that's giving me an issue..
>
> http://161.35.5.174/wave/ <<<< current live site for now
> Symfony?\?Component?\?HttpKernel?\?Exception?\?Meth
> odNotAllowedHttpException PHP 8.2.10-2ubuntu1
> 9.52.16
> The GET method is not supported for route /. Supported methods:
> HEAD... .
> .
> which is interesting.. if I knew what it meant!
>

If you were to enter that error message string into your search
engine of choice I believe that you would get a number of entries
that discuss and provide approaches to resolving it.

This appears to be a laravel-specific issue, and not related with
either your httpd environment or php (where you have also been
posting questions specific to this framework).

The search results will likely also give pointers to lists/forums
that are more directly relevant for laravel support issues.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org