Support the ongoing development of Laravel.io →
Configuration Installation Requests
Last updated 2 weeks ago.
0

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-...) that shows how to set them up on ubuntu but should work on most installs

Regards

Timothy

0

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

0

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

0

This is my thread on stack overflow asking about the same situation.

https://stackoverflow.com/questions/57413827/laravel-returns-n...

Interestingly one of the comments points me to another thread with a similar issue

https://stackoverflow.com/questions/14555996/no-input-file-spe...

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

0

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.

0

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#ssilegac...
  <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
Last updated 2 years ago.
0

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

0

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

http://laravel.so-mad.com/laravel/public/

Last updated 2 years ago.
0

Sign in to participate in this thread!

LoadForge

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2022 Laravel.io - All rights reserved.