Coder Social home page Coder Social logo

anonib-3d's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

anonib-3d's Issues

Finally got it working

Ok so after a few hours of messing with this I finally got this to work.

Idk where else to put this but maybe the README file should be made clearer. Here is what I did:

  1. Delete ready2use folder. Since its just the angular project already built it wont allow to alter the code so its not useful.
  2. Add the following rule to vhosts.conf file
    • Name and location of file will vary depending on your environment, in case you use XAMPP on linux it would be /opt/lampp/etc/extra/httpd-vhosts.conf
    • root directory will be the same folder where angular project is built
    • /srv uri will serve contents of src_php directory
    • change /var/www/vhosts/AnonIB-3D to wherever you have the project
    <VirtualHost *:80>
            DocumentRoot "/var/www/vhosts/AnonIB-3D/src_angular/dist"
    
            ServerName 3danon.local
            ServerAlias www.3danon.local
    
            <Directory "/var/www/vhosts/AnonIB-3D/src_angular/dist">
                    AllowOverride All 
                    Require all granted
            </Directory>
    
            Alias /srv "/var/www/vhosts/AnonIB-3D/src_php"
            <Directory "/var/www/vhosts/AnonIB-3D/src_php">
                    AllowOverride All 
                    Require all granted    
            </Directory>
    
            ErrorLog "logs/3danon.com-error_log"
            CustomLog "logs/3danon.com-access_log" common
    </VirtualHost>
    
  3. Edit contents of AnonIB-3d/src_angular/src/environments/environment.ts and change apiUrl to srv/php. Now it should look like this
        export const environment = {
          production: false,
          apiUrl: 'srv/php',
          clientUrl: '/',
        };
  4. Open the file src_angular/angular.json and edit this line: "outputPath": "dist/prota-angular", to "outputPath": "dist".
    This makes directories simpler.
  5. Move to project directory, install the project dependencies and build angular project:
    cd src_angular && npm i && ng build --prod
  6. Move to src_angular/dist and create .htaccess as described on README
    RewriteEngine on
    RewriteCond %{REQUEST_FILENAME} -s [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [NC,L]
    RewriteRule ^(srv|user)($|/) - [L]
    RewriteRule ^(.*) index.html [NC,L]
    
  7. Setup the admin and database, etc. described on steps 2-4 on README

That was wild to figure out considering I dont have knowledge of Angular. ALso this should allow you to alter the files freely, and without having to move the dist directory to root everytime you modify the Agular project

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.