Hi Josh,
You don't list who your host is or what server operating system your running. but to me it sounds like you are looking for name based virtual hosts please check out [this link] (https://www.linode.com/docs/websites/hosting-a-website-ubuntu-18-04/#configure-name-based-virtual-hosts) that shows how to set them up on ubuntu but should work on most installs
Regards
Timothy
Hi Timothy,
Its running on CentOs 6 and is my own dedicated system. I'm unsure about using the method described above as the server has a lot of my clients on there. This was just going to be a training exercise for myself to learn as a potential new client is using Laravel. I didn't think it would be a pain just to get the public folder be the root of the domain. What i have done should have worked logically.
Any ideas on how to fix my issue rather than trying a slightly different, but in the end same idea.
Thanks in advance
If its a dedicated server hosing multiple clients then I would suggest signing up for a free AWS trial and spin up a small ec2 instance and experiment on that instead of an production system
The link I posted I only wanted you to have a look at the configure-name-based-virtual-hosts section
You might also share your .conf file and we can have a look at what is going on.
but just to let you know I cant get it to run on the http://laravel.so-mad.com/laravel/public
This is my thread on stack overflow asking about the same situation.
Interestingly one of the comments points me to another thread with a similar issue
https://stackoverflow.com/questions/14555996/no-input-file-specified
The accepted answer explains numerous potential faults within this particular CMS which could also be a flaw in the current version of Laravel. Does anyone have any more information on the inner workings of Laravel and could potentially shed some light on this
I cant get it to run on the http://laravel.so-mad.com/laravel/public
This is because it currently has the changes added to the conf file. I will grab it now and show you whats going on.
If its a dedicated server hosing multiple clients then I would suggest signing up for a free AWS trial and spin up a small ec2 instance and experiment on that instead of an production system
I could do this, but the idea is to have a laravel cms set up on the production system. This so-mad domain is just our testing and development domain that we use on the server for things like this.
<VirtualHost 109.169.61.133:80>
ServerName laravel.so-mad.com
ServerAlias www.laravel.so-mad.com
DocumentRoot /home/somad/public_html/nobackup/laravel
ServerAdmin [email protected]
UseCanonicalName Off
Options -ExecCGI -Includes
RemoveHandler cgi-script .cgi .pl .plx .ppl .perl
## User somad # Needed for Cpanel::ApacheConf
<IfModule userdir_module>
<IfModule !mpm_itk.c>
<IfModule !ruid2_module>
<IfModule !mod_passenger.c>
UserDir disabled
UserDir enabled somad
</IfModule>
</IfModule>
</IfModule>
</IfModule>
# Enable backwards compatible Server Side Include expression parser for Apache versions >= 2.4.
# To selectively use the newer Apache 2.4 expression parser, disable SSILegacyExprParser in
# the user's .htaccess file. For more information, please read:
# http://httpd.apache.org/docs/2.4/mod/mod_include.html#ssilegacyexprparser
<IfModule include_module>
<Directory "/home/somad/public_html/nobackup/laravel">
SSILegacyExprParser On
</Directory>
</IfModule>
<IfModule suphp_module>
suPHP_UserGroup somad somad
</IfModule>
<IfModule suexec_module>
<IfModule !mod_ruid2.c>
SuexecUserGroup somad somad
</IfModule>
</IfModule>
<IfModule ruid2_module>
RMode config
RUidGid somad somad
</IfModule>
<IfModule mpm_itk.c>
# For more information on MPM ITK, please read:
# http://mpm-itk.sesse.net/
AssignUserID somad somad
</IfModule>
<IfModule mod_passenger.c>
PassengerUser somad
PassengerGroup somad
</IfModule>
# Global DCV Rewrite Exclude
<IfModule rewrite_module>
RewriteOptions Inherit
</IfModule>
Include "/etc/apache2/conf.d/userdata/std/2_4/somad/laravel.so-mad.com/*.conf"
DocumentRoot /home/somad/public_html/nobackup/laravel/laravel/public
<IfModule proxy_fcgi_module>
<FilesMatch \.(phtml|php[0-9]*)$>
SetHandler proxy:unix:/opt/cpanel/ea-php73/root/usr/var/run/php-fpm/c463bd675bbb93f9c0c6359a7e202c416d3bf916.sock|fcgi://laravel.so-mad.com
</FilesMatch>
</IfModule>
# To customize this VirtualHost use an include file at the following location
# Include "/etc/apache2/conf.d/userdata/std/2_4/somad/laravel.so-mad.com/*.conf"
</VirtualHost>
As you can see its all auto generated and to be able to edit this we have to created and edit a file at;
Include "/etc/apache2/conf.d/userdata/std/2_4/somad/laravel.so-mad.com/*.conf"
That included file includes only one line that i've written and its;
DocumentRoot /home/somad/public_html/nobackup/laravel/laravel/public
Josh are all your clients running websites on this server ?
try changing the included .conf to
DirectoryIndex index.html index.php DocumentRoot /home/somad/public_html/nobackup/laravel/laravel/public
I would still suggest booting up a vm to experiment on instead of a live system
Im currently traveling so I cant download a config from my server to show you
Josh are all your clients running websites on this server ?
Quite a few of them yes, we have a couple of servers.
I updated the included conf to your suggestions but it was still the same. I have since disabled the new lines in the conf so you can see it now works fine as a standard laravel install
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community