Ok so I think I set up a gti hook on the server (according to tutorial).

So now Im back on my local computer. Which files shall I include / exclude from GIT? I cant seem to fins a tutorial for this? Anyone got a good link to tutorial for which files to include in git version handling?

(Ofc I understand if I create new controllers, view pages, middleware and so on I need to include those but what files from laravel installation do i need to include)?

If we're still talking Laravel, it should come with a .gitignore file out of the box. You shouldn't really need to modify it.

For a rule of thumb, don't commit code you don't own (eg /vendor, /node_modules, etc) and don't commit code containing sensitive information (like your .env file). For the latter, it generally makes sense to include a dummy version of that file that represents the structure without the values.

Ok so I almost got it working now.. I made a local homepage that i pushed to production server through git (smashes my head against the wall for not using git before..its really cool ).

So I can see my homepage online.

then I made some text change to welcome.blade on my local server and pushed it to production and it works fine so I thought I had it all setup but then i add auth to my local page and it works fine but when i push it to production I get:Not FoundThe requested URL /login was not found on this server.

same with register - not found

However the welcome to lavarel page was updated with links to login and register in upper right corner..

Do I need to change something in the .htaccess file? Atm my /public htaccess looks like:

Nope, i used the php artisan create:auth command on my local and it works fine there.. in git there was some files/folders created that i pused to production server and thats all. I thought it could be some routes problem but when i checked routes on my local it doesn't contain routes to login / register so I thought it wasn't nessecary?

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/',function(){return view('welcome');});

Auth::routes();

Route::get('/home','HomeController@index')->name('home');

I don't get why it would work good on my local but not my production since they look the same?

<VirtualHost *:80># The ServerName directive sets the request scheme, hostname and port that# the server uses to identify itself. This is used when creating# redirection URLs. In the context of virtual hosts, the ServerName# specifies what hostname must appear in the request's Host: header to# match this virtual host. For the default virtual host (this file) this# value is not decisive as it is used as a last resort host regardless.# However, you must set it for any further virtual host explicitly.#ServerName http://www.example.com

# For most configuration files from conf-available/, which are# enabled or disabled at a global level, it is possible to# include a line for only one particular virtual host. For example the# following line enables the CGI configuration for this host only# after it has been globally disabled with "a2disconf".#Include conf-available/serve-cgi-bin.confRewriteEngine on
RewriteCond %{SERVER_NAME}=nfoscan.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

000-default-le-ssl.conf (I suspect this is where its wrong or that im missing override)

<IfModule mod_ssl.c><VirtualHost *:443># The ServerName directive sets the request scheme, hostname and port that# the server uses to identify itself. This is used when creating# redirection URLs. In the context of virtual hosts, the ServerName# specifies what hostname must appear in the request's Host: header to# match this virtual host. For the default virtual host (this file) this# value is not decisive as it is used as a last resort host regardless.# However, you must set it for any further virtual host explicitly.#ServerName http://www.example.com

# For most configuration files from conf-available/, which are# enabled or disabled at a global level, it is possible to# include a line for only one particular virtual host. For example the# following line enables the CGI configuration for this host only# after it has been globally disabled with "a2disconf".#Include conf-available/serve-cgi-bin.confSSLCertificateFile /etc/letsencrypt/live/nfoscan.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/nfoscan.com/privkey.pemInclude/etc/letsencrypt/options-ssl-apache.conf
ServerName nfoscan.com</VirtualHost></IfModule>

Unless it's working on HTTP and failing on HTTPS, I wouldn't worry about the SSL config too much. At a glance, the vhost config looks fine to me. I have my Directory in quotes and with a trailing slash, but don't know that that makes a difference. What I'd recommend is to compare it against your local config, since you know that is working. Again, check that mod_rewrite is enabled. You should see that in httpd.conf

I followed some guide that makes all connection https and its failing on the https.. I havent been able to test http since it always switches to https (I suspect it would work on http but fail on https since 000-default.conf is config for http right? Here I could add the <Directory /var/www/html/Test/public> Options Indexes FollowSymLinks MultiViews AllowOverride All Require all granted </Directory>

but when i try to add this ^^ part into 000-default-le-ssl.conf (which is the config for https right?) i get internal server error... ?

So my guess is I configured rewrite for http but not https ??? But im very new to this all so I might have misunderstood it all?

Maybe start by undoing that change that forces things to HTTPS just so you can see where things are breaking?

Well I spent last 1-2 weeks trying to set it up following different tutorials (Im totally new to DO, Laravel, Unix, GIT ...) So this will be my last option, I dont know what I did when I enabled ssl so I don't really dare to try and remove it now when I'm so close if I mess up.

http://www.mysite/index.php/login is working but i guess that /login works is because of auth:routing instead of .htaccess rewrite right (instead of like /login.blade.php)

Who is online

Users browsing this forum: No registered users and 3 guests

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum